FAQ
I have a program that reads data from file, but can only process utf-8 data.

When on Windows, these files are encoded as windows1252, and I need to
convert them to utf-8.
When on Linux, they are often already encoded as utf-8.

On Linux, I can read the environment variable LC_CTYPE, or call the libc
function nl_langinfo(CODESET)

But is there any more general means to retrieve the default encoding used
by the host ?

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 2 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedAug 7, '15 at 4:36p
activeAug 7, '15 at 7:37p
posts2
users2
websitegolang.org

2 users in discussion

Tamás Gulácsi: 1 post Nicolas riesch: 1 post

People

Translate

site design / logo © 2021 Grokbase