How to Convert ANSI to UTF8 in Golang?

1,240 views
Skip to first unread message

pynets

unread,
Aug 3, 2011, 3:56:40 AM8/3/11
to golang-nuts
How to Convert ANSI to UTF8 in Golang?

Jan Mercl

unread,
Aug 3, 2011, 11:02:21 AM8/3/11
to golan...@googlegroups.com
On Wednesday, August 3, 2011 9:56:40 AM UTC+2, pynets wrote:
How to Convert ANSI to UTF8 in Golang?

Depends on your definition of 'ANSI'. 

Ian Lance Taylor

unread,
Aug 3, 2011, 10:29:11 AM8/3/11
to pynets, golang-nuts
pynets <pyn...@gmail.com> writes:

> How to Convert ANSI to UTF8 in Golang?

There is no standard library support for different character sets at
present.

Perhaps http://code.google.com/p/mahonia/ will help, I'm not sure.

Ian

Andrew Gerrand

unread,
Aug 3, 2011, 2:45:33 PM8/3/11
to golan...@googlegroups.com
What do you mean by ANSI?

Is it this?
Or this?

The standard 7-bit ASCII character set is often confused with ANSI, but it is a subset of UTF-8 (so no conversion is necessary):

Andrew

andyb...@gmail.com

unread,
Aug 4, 2011, 4:31:05 PM8/4/11
to golan...@googlegroups.com, pynets
In Mahonia, the character set that Microsoft calls "ANSI" is called "windows-1252".
Reply all
Reply to author
Forward
0 new messages