[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnokii 0.6.31 problem with german umlauts
From: |
Pawel Kot |
Subject: |
Re: gnokii 0.6.31 problem with german umlauts |
Date: |
Mon, 20 Aug 2012 10:06:51 +0200 |
Hi,
On Sat, Aug 18, 2012 at 1:07 PM, Daniele Forsi <address@hidden> wrote:
> 2012/8/17 lsg:
>
>> Maybe use something like that will help with foreign characters
>
> thank you but glib is supposed to handle encodings for us
>
> Pawel, I have a fix for the wrong encoding which is due to
> gn_sms_send() converting in place the buffer to UTF-8 while later code
> assumes it's still in the system locale, which for the OP is
> ISO-8859-15
Well, yes... It may be tha case. I might wanted to simplify the code
with some assumptions, like "who the hell does not use utf-8 these
days". My bad it is not documented not correctly handled.
Stefan - is there any particular reason you don't use UTF-8?
> but my fix segfaults because str is NULL if the input
> can't be converted, eg. with UTF-8 locale this segfaults after my
> "fix" while it sends an empty SMS without my fix:
> echo -e "\xdf" | gnokii --phone fake --sendsms 123
> it doesn't matter if there are valid chars before or after the invalid one
>
> the easier fix would be to exit with an error from gn_sms_send() if
> g_locale_to_utf8() fails sending an empty SMS makes no sense to me,
> but IIRC when libgnokii was using only iconv() invalid chars where
> replaced with question marks which was at least an hint of where the
> things went wrong
Well, I need some time to look at it and think again trying to remind
myself rationale for all this stuff.
thanks,
--
Pawel Kot
- Re: gnokii 0.6.31 problem with german umlauts, (continued)
- Re: gnokii 0.6.31 problem with german umlauts, Pawel Kot, 2012/08/13
- Re: gnokii 0.6.31 problem with german umlauts, Stefan Rupprecht, 2012/08/13
- Re: gnokii 0.6.31 problem with german umlauts, Stefan Rupprecht, 2012/08/13
- Re: gnokii 0.6.31 problem with german umlauts, Pawel Kot, 2012/08/13
- Re: gnokii 0.6.31 problem with german umlauts, Stefan Rupprecht, 2012/08/16
- Re: gnokii 0.6.31 problem with german umlauts, Axel Gruber, 2012/08/16
- Re: gnokii 0.6.31 problem with german umlauts, Pawel Kot, 2012/08/16
- Re: gnokii 0.6.31 problem with german umlauts, Daniele Forsi, 2012/08/16
- Re: gnokii 0.6.31 problem with german umlauts, lsg, 2012/08/17
- Re: gnokii 0.6.31 problem with german umlauts, Daniele Forsi, 2012/08/18
- Re: gnokii 0.6.31 problem with german umlauts,
Pawel Kot <=
- Re: gnokii 0.6.31 problem with german umlauts, Stefan Rupprecht, 2012/08/20