Re: Can I add the charset parameter to the pilot device configuration?



On Mon, 2004-11-08 at 14:36, David A. Desrosiers wrote:
> > There is a patch floating around, dated 2002, that aimed to pick up 
> > a PILOTCHARSET environment variable and use it in pilot-link's 
> > convert_ToPilotChar.  It was never incorporated into pilot-link, so 
> > maybe David Desrosiers will comment.
> 
>  	We follow the Palm SDK pretty closely.. and it defines:
> 
> #define encodingNameAscii       "us-ascii"
> #define encodingNameISO8859_1   "ISO-8859-1"
> #define encodingNameCP1252      "Windows-1252"
> #define encodingNameShiftJIS    "Shift_JIS"
> #define encodingNameCP932       "Windows-31J"
> #define encodingNameUTF8        "UTF-8"
> #define encodingNameUCS2        "ISO-10646-UCS-2"
> #define encodingNamePalmGSM     "palmGSM"
> #define encodingNameBig5        "Big5"
> #define encodingNameBig5_HKSCS  "Big5-HKSCS"
> #define encodingNameGB2312      "GB2312"
> #define encodingNameHZ          "HZ-GB-2312"

The Palm SDK also defines
#define charEncodingCP1250              CHAR_ENCODING_VALUE(27)

...and has a bunch of other CharEncodingType defines.
There are 90 of them at present (PalmLocale.h, Palm OS 5 SDK (68K) R3).

The preferred #defines are now the CharEncodingType defines, in fact
I believe the encodingName #defines have been removed in Cobalt:
http://www.palmos.com/dev/support/docs/protein_books/PortingPalmApps/PalmLocale.html

I like Ladislav's suggestion of a charset setter in pilot-link's
util.c.  I can't see any way to retrieve the device's charset at sync
time, so we probably have to rely on the user to select a charset.  We
can check to see if it is supported by iconv and listed in the current
PalmLocale.h.  There's certainly some work matching the palm encoding
types to iconv charset identifiers.  How standard are they, anyway?

This thread should probably move to pilot-list.

Matt



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