unicode converting

Christos TZOTZIOY Georgiou tzot at sil-tec.gr
Tue Mar 15 20:00:42 CET 2005


On Tue, 15 Mar 2005 18:54:20 +0200, rumours say that Maxim Kasimov
<kasimov at i.com.ua> might have written:

>> It shouldn't be your concern - but you can specify it using " ./configure
>> --enable-unicode=ucs2" or --enable-unicode=ucs4. You can't set it to utf-8
>> or utf-16.

>is that means that python internal unicode format is ucs2 or ucs4?
>i'm concerning with the qustion because i need to send data to external
>application in ucs2 encoding

If unicode_data references your unicode data, all you have to send is:

unicode_data.encode('utf-16') # maybe utf-16be for network order

You should not care about internal encoding of unicode objects.
	
-- 
TZOTZIOY, I speak England very best.
"Be strict when sending and tolerant when receiving." (from RFC1958)
I really should keep that in mind when talking with people, actually...



More information about the Python-list mailing list