RE: Unicode string handling

<[email protected]>
Newsgroups gmane.comp.mobile.bitpim.devel
Message-ID <001801c65eaa$a91dedc0$0201a8c0@HOME>
> If we all decide to go with a new class, I'd suggest 
> restoring the STRING class and working on the new one.  The 
> STRING class works fine for string fields and needs no 
> changes at this time.  The terminator issue applies to 
> unicode strings only, which would hopefully be handled 
> properly in the new class.

I've checked in the USTRING class and restored STRING.
I've also converted 9 phones to use the new class and tested them as much as
I can. Between them they exercise most of the new functionality.
I think we should plan to delete the old STRING class within some time
period (4-6 weeks) meaning we will have to upgrade all the other phones
(~40) but without the pressure of having to get it all done before the next
build, the new class is contains all the same functionality as the old.
Stephen can you do the sanyo/samsungs you have? I have a couple of sanyos so
I could have a go at these if you want.

We also need to fix the CSVSTRING class to fully implement support for phone
codesets.

The new class allows you to set a multi-byte terminator. To declare a string
with a two byte 0 terminator using utf-16le you would do.
40 USTRING { 'terminator':0, 'terminator_length':2, 'encoding':'utf-16le' }
name
The 2 byte terminator counts towards the number of bytes when calculating
'sizeinbytes'. The keywords only affect the string written to/read from the
phone.

I have not tested with a terminator longer than 1 byte, but I can look at
logs if it does not work.

Simon



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.