Unicode-Ascii Coversion

Torbjorn Tornkvist tobbe@REDACTED
Mon Jan 30 14:38:49 CET 2006


Bengt Kleberg wrote:
> On 2006-01-30 12:50, Surindar Sivanesan wrote:
> ...deleted
> 
>> For eg the Unicode list will be like this [78,0,49,0,50,0] where the 
>> original content is "N12" in Ascii we get the same as [78,49,50].
> 
> 
> out of curiosity: what are you receiving?
> 
> since one well established unicode-over-network-encoding (utf-8) has a 
> one-to-one mapping for ascii<->utf8 i assume that you are not getting 
> utf-8.
> some machine-specific unicode systems (java) use 2 octets for one 
> unicode char. if your origininating computer is lsb (intel) then 78 for 
> ''N'' would become [78,0].
> am i correct?
> why does whoever-it-is-that-is-sending-to-you send machine specific 
> unicode instead of utf-8?
> 
> 
> bengt
> 

It looks more like UCS2 (UTF-16) which you may get from a Windoze machine.

--Tobbe





More information about the erlang-questions mailing list