Re: unicode problem with sqlbox Revision: 62

2024-07-05 Thread Kyriacos/Netsmart

Hi,

Did you upgrade both kannel and the DB server/version at once? If you 
set the new kannel instance to write to the old DB, or the old kannel to 
the new DB what happens?


Kyriacos

On 04/07/2024 12:42 pm, Konstantinos Liadakis wrote:


Here is the insert query which works perfectly fine on old system but 
not on the new one


INSERT INTO send_sms (
    sql_id, momt, sender, receiver, udhdata, msgdata, time, smsc_id, 
service, account, id, sms_type, mclass, mwi, coding, compress, 
validity, deferred, dlr_mask, dlr_url, pid, alt_dcs, rpi, charset, 
boxc_id, binfo, meta_data, priority, foreign_id

) VALUES (
    1, 'MT', 'UnicKlad', '306931234567', NULL, 
'%ce%b1%ce%b2%ce%b3%ce%b4%ce%b5%ce%b6%ce%b7%ce%b8%ce%b9%ce%ba%ce%bb%ce%bc%ce%bd%ce%be%ce%bf%cf%80%cf%81%cf%83%cf%84%cf%85%cf%86%cf%87%cf%88%cf%89%0a%40%23!%24%25%5e%26*()+%5b%5d+%7b%7d+%27%3b+%3f+%3c%3e+%2f+%5c+%7c%3d+%2b+-+%e2%82%ac', 
NULL, 'MYSMSC', NULL, 'account', NULL, 2, NULL, NULL, 2, NULL, 4320, 
NULL, 19, 'http://url', NULL, NULL, NULL, 'utf-8', NULL, NULL, NULL, 
NULL, NULL

);

On 4/7/24 12:39, Ruben Melikyan wrote:

Hi Dinos,
Please paste here your sql query which inserts unicode message to 
SendTable.


Please provide full query

Best regards,
Ruben Melikyan

*From:* Konstantinos Liadakis 
*Sent:* Thursday, July 4, 2024 11:44:39 AM
*To:* Ruben Melikyan ; users@kannel.org 
*Subject:* Re: unicode problem with sqlbox Revision: 62

Hellomy replies below to your questions

1. I can send normal sms with no problem, it is just unicode that i 
am not able to send


2. MariaDB [kannel]> show variables like '%char%';
+--++
| Variable_name    | Value  |
+--++
| character_set_client | utf8mb4    |
| character_set_connection | utf8mb4    |
| character_set_database   | utf8mb4    |
| character_set_filesystem | binary |
| character_set_results    | utf8mb4    |
| character_set_server | utf8mb4    |
| character_set_system | utf8mb3    |
| character_sets_dir   | /usr/share/mysql/charsets/ |
+--++
8 rows in set (0.002 sec)

MariaDB [kannel]> show variables like '%collation%';
+--++
| Variable_name    | Value  |
+--++
| collation_connection | utf8mb4_general_ci |
| collation_database   | utf8mb4_general_ci |
| collation_server | utf8mb4_general_ci |
+--++
3 rows in set (0.001 sec)


3. I am sending message by making an insert to mysql

4. Yes

5. The table is created by sqlbox it self

MariaDB [kannel]> select * from sent_sms;
++--+--+--+-+++--+-++--+--++--++--+--+--+--++--+-+--+-+-+---++--++
| sql_id | momt | sender   | receiver | udhdata | msgdata | 
time   | smsc_id  | service | account    | id   | sms_type | 
mclass | mwi  | coding | compress | validity | deferred | dlr_mask | 
dlr_url | pid  | alt_dcs | rpi  | charset | boxc_id | binfo | 
meta_data  | priority | foreign_id |

++--+--+--+-+++--+-++--+--++--++--+--+--+--++--+-+--+-+-+---++--++

I installed kannel from svn, and also sqlbox.

Today i did make clean in sqlbox and recompiled the one from addons 
folder, but i is exactly the same version when doing svn info


I am sure if i install an older version everything will work

Thank you for your efforts

Best regards

Dinos

On 4/7/24 07:24, Ruben Melikyan wrote:

Hi Dinos,
If so, I need more info:

 1. if you send ASCII( not unicode message), what happens? Do you
see record in your table?
 2. What are your DB settings ?
 3. How do you send message? Please 

Re: unicode problem with sqlbox Revision: 62

2024-07-05 Thread Ruben Melikyan
Hi Dinos,
I haven’t any additional idea. Probably it’s bug. Request should work as 
expected.

I think using old version is the best decision in this situation.

Best regards,
Ruben Melikyan

From: Konstantinos Liadakis 
Sent: Friday, July 5, 2024 12:20:49 PM
To: Ruben Melikyan ; users@kannel.org 
Subject: Re: unicode problem with sqlbox Revision: 62


Hello, i tried your query and get exactly the same error

2024-07-05 08:18:57 [51778] [1] ERROR: MYSQL: You have an error in your SQL 
syntax; check the manual that corresponds to your MariaDB server version for 
the right syntax to use near '' at line 1
2024-07-05 08:18:57 [51778] [1] ERROR: MYSQL: You have an error in your SQL 
syntax; check the manual that corresponds to your MariaDB server version for 
the right syntax to use near ')' at line 1
2024-07-05 08:18:57 [51778] [1] ERROR: Could not charset process message, 
dropping it!

I dont believe there is something wrong with my query or database/table setup 
as using exactly same query on old system everything works as expected

If i cannot find a solution i will compile to new system the code from the old 
system to make sure it works

Something has changed in revision 62, this is what i am guessing


On 4/7/24 13:57, Ruben Melikyan wrote:

INSERT INTO send_sms

(

   `momt`,

`sender`,

`receiver`,

`msgdata`,

`time`,

`service`,

`sms_type`,

`coding`,

`charset`,

`dlr_mask`

)



VALUES (

'MT',

'UnicKlad',

'306931234567',


'%ce%b1%ce%b2%ce%b3%ce%b4%ce%b5%ce%b6%ce%b7%ce%b8%ce%b9%ce%ba%ce%bb%ce%bc%ce%bd%ce%be%ce%bf%cf%80%cf%81%cf%83%cf%84%cf%85%cf%86%cf%87%cf%88%cf%89%0a%40%23!%24%25%5e%26*()+%5b%5d+%7b%7d+%27%3b+%3f+%3c%3e+%2f+%5c+%7c%3d+%2b+-+%e2%82%ac',

UNIX_TIMESTAMP(),

'sqlbox',

'2',

'2',

'utf-8',

'19'

);


Re: unicode problem with sqlbox Revision: 62

2024-07-05 Thread Konstantinos Liadakis

Hello, i tried your query and get exactly the same error

2024-07-05 08:18:57 [51778] [1] ERROR: MYSQL: You have an error in your 
SQL syntax; check the manual that corresponds to your MariaDB server 
version for the right syntax to use near '' at line 1
2024-07-05 08:18:57 [51778] [1] ERROR: MYSQL: You have an error in your 
SQL syntax; check the manual that corresponds to your MariaDB server 
version for the right syntax to use near ')' at line 1
2024-07-05 08:18:57 [51778] [1] ERROR: Could not charset process 
message, dropping it!


I dont believe there is something wrong with my query or database/table 
setup as using exactly same query on old system everything works as expected


If i cannot find a solution i will compile to new system the code from 
the old system to make sure it works


Something has changed in revision 62, this is what i am guessing


On 4/7/24 13:57, Ruben Melikyan wrote:


INSERT INTO send_sms

(

   `momt`,

    `sender`,

    `receiver`,

    `msgdata`,

    `time`,

    `service`,

    `sms_type`,

    `coding`,

    `charset`,

    `dlr_mask`

)

VALUES (

    'MT',

'UnicKlad',

'306931234567',


'%ce%b1%ce%b2%ce%b3%ce%b4%ce%b5%ce%b6%ce%b7%ce%b8%ce%b9%ce%ba%ce%bb%ce%bc%ce%bd%ce%be%ce%bf%cf%80%cf%81%cf%83%cf%84%cf%85%cf%86%cf%87%cf%88%cf%89%0a%40%23!%24%25%5e%26*()+%5b%5d+%7b%7d+%27%3b+%3f+%3c%3e+%2f+%5c+%7c%3d+%2b+-+%e2%82%ac',

    UNIX_TIMESTAMP(),

    'sqlbox',

    '2',

    '2',

    'utf-8',

'19'

);