Re: Unicode string handling

"Roger Binns" <[email protected]>
Newsgroups gmane.comp.mobile.bitpim.devel
Message-ID <00be01c65dec$23c0f0f0$3501a8c0@rogersqyvr14d3>
> *.test='abc' would produce 'a\x00b\x00c\x00,' which would certainly fail to decode.

That is because you are treating the terminator as a byte.  The
terminator should be in the encoding of the string.  Additionally
there is no reason why the terminator can't be specified as
u',' or ",\x00".

I don't see any reason why this unified string class won't work
providing careful attention is paid to when conversions happen
and what encoding pieces of data (like the terminator) are in.

I think it is especially dangerous abandoning old phones.  If we
don't bring their code up to date then they will slowly but
surely diverge from the main codebase.  When someone finally
does use them, the exception will be confusing and not similar
to current exceptions.  To fix anything would require two
steps.  One is to bring the code up to date, and then the
second would be to fix the underlying issue.  The difficulty
of the first (which gets harder and harder over time) means
the latter becomes less and less likely to be fixable.
See the lgtm_520 module for a good example of exactly this
happening.

Quite frankly BitPim is a community project.  If people in
that community stop paying attention, or don't care about
particular models then I don't see the point of BitPim
also doing so.

Roger


-------------------------------------------------------
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.