Unicode-Ascii Coversion

Torbjorn Tornkvist <>
Mon Jan 30 14:06:06 CET 2006


Surindar Sivanesan wrote:
> Hi All,
>    I want to convert Unicode List to Ascii Code List in erlang.
> We are getting packets in TCP/IP communication as Unicode characters but 
> we want to convert it as Ascii code list so thatw ecan process further 
> and also i want to kow how to convert Ascii list to Unicode list.
> Can any one help to solve this.
>  
> 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].
> 
> -- 
> with regards,
> S.Surindar

You can try the iconv (erlmerge) package,
which also is located in jungerl.

I'm using it in the SMB protocol (esmb) as well
as for displaying Web pages with the correct charset.

Cheers, Tobbe




More information about the erlang-questions mailing list