gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: smsd does not work with greek characters


From: A. Andria
Subject: Re: smsd does not work with greek characters
Date: Thu, 31 Aug 2006 07:31:39 +0700
User-agent: Thunderbird 1.5.0.5 (Windows/20060719)

Nick wrote:
LC_ALL = el_GR

The mysql module is still not working (the file module works)
When i use comand line mysql queries, i get greek characters,
but the mysql module send still ?????? in sms messages

There must me something wrong when the the mysql database
send data to gnokii, have tried mysql 4.1 and 5 with several my.cnf
configs (default characert greek etc) with no luck

I dont know C, but in php aplications when a similar problem occures,
i bypass it by setting mysql_query("SET NAMES greek") in the conection string
is there any way to code this in the smsd code,
so that every time it runs the database conection, to run this code
exactly after the conection?

Thanks
If you are using 0.6.14 gnokii version, please look to the file smsd/mysql.c

Go to the line 152 - 154. It contains the below code :

g_string_sprintf (buf, "SELECT id, number, text, dreport FROM outbox \
                         WHERE processed='0' AND CURTIME() >= not_before \
                         AND CURTIME() <= not_after %s", phnStr->str);

I don't know if this work. But you can try to change the line like this below :

g_string_sprintf (buf, "SET NAMES greek;SELECT id, number, text, dreport FROM outbox \
                         WHERE processed='0' AND CURTIME() >= not_before \
                         AND CURTIME() <= not_after %s", phnStr->str);

Or you can change the code like similar and execute before selecting the outbox table.

--
Regards,

Asep Andria I.W.
http://asepandria.blogspot.com
--





reply via email to

[Prev in Thread] Current Thread [Next in Thread]