Re: AW: PyDS RPC fix

Phillip Pearson <[email protected]> Tue, 11 Jan 2005 10:29:25 +1300
Newsgroups gmane.comp.pythin.pyds.devel
Message-ID <[email protected]>
> But nonetheless, to write something out in Python - regardless of where 
> you write it - you have to encode it in some 8bit string by either 
> using utf-8 or some other means. You could pickle Unicode strings, but 
> that would use some form of encoding, too - it would only make the 
> whole stuff more insecure :-)

Ahh, I didn't mean that (storing Python unicode strings in the DB
through some magic encoding).  What I meant was to store
myvalue.encode("utf-16") in the DB, sort of like how we store
myvalue.encode("utf-8") at the moment ...

>>> 'asdf'.encode("utf-16")
'\xff\xfea\x00s\x00d\x00f\x00'

Of course, this is pretty much unreadable, which I don't like :-)

Cheers,
Phil