gnokii-users
[Top][All Lists]
Advanced

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

Re: Euro symbols show up as Currency symbols


From: Pawel Kot
Subject: Re: Euro symbols show up as Currency symbols
Date: Thu, 25 Jul 2002 12:01:02 +0200 (CEST)

On Thu, 25 Jul 2002, Pawel Kot wrote:

> OK. Should be done at the moment in CVS. Just issue:
> echo "some text containing euro (\x0a4) character" | gnokii --sendsms 123456
> There's also support for the whole GSM Default Alphabet Extension.
> Unfortunatetly, as the euro has the same code as currency symbol, you
> can't use the latter at the moment.

OK. This is fixed at the moment (I think). The distinction is based on
locale. When the current locale support euro, the euro symbol is being
sent, otherwise -- the currency symbol. Eg. de_DE, pl_PL would send
currency, while address@hidden would send euro. Changes are already in CVS,
the patch is quite simple though:

--- gsm-encoding.c~     Thu Jul 25 11:43:45 2002
+++ gsm-encoding.c      Thu Jul 25 11:43:45 2002
@@ -94,6 +94,9 @@

 static bool IsDefaultAlphabetExtensionChar(unsigned char value)
 {
+       wchar_t retval;
+
+       if (mbtowc(&retval, &value, 1) == -1) return false;
        return (value == 0x0c ||
                value == '^' ||
                value == '{' ||
@@ -103,7 +106,7 @@
                value == '~' ||
                value == ']' ||
                value == '|' ||
-               value == 0xa4);
+               retval == 0x20ac);
 }

 static unsigned char DecodeWithDefaultAlphabetExtension(unsigned char value)
pkot
-- 
mailto:address@hidden :: mailto:address@hidden
http://kt.linuxnews.pl/ :: Kernel Traffic po polsku




reply via email to

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