Skip to Content.
Sympa Menu

freetds - [freetds] Setting correct Charset on Mac os X

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Olivier Amblet <olivier AT miettes.ch>
  • To: freetds AT lists.ibiblio.org
  • Subject: [freetds] Setting correct Charset on Mac os X
  • Date: Thu, 25 Oct 2007 12:21:32 +0200

Hi,

I would like to give a small follow up on this entry which greatly help me to solve my locale charset problem on mac os x freetds install.

original mail : https://lists.ibiblio.org/sympa/arc/freetds/ 2007q3/022379.html

* The command 'locale' returns the display locale settings of your system.

>$ locale
LANG=
LC_COLLATE="C"
LC_CTYPE="C"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL="C"

'C' is the default posix encoding. To display a complete list of available charset use locale -a
>$ locale -a
af_ZA
af_ZA.ISO8859-1
af_ZA.ISO8859-15
af_ZA.UTF-8
am_ET
am_ET.UTF-8
...

Now, just set your LC_ALL env to any of those variables.

>$ export LC_ALL=fr_CH.ISO8859-1
or
>$ export LC_ALL=en_GB.UTF-8

And you should obtains :
>$ locale
LANG=
LC_COLLATE="en_GB.UTF-8"
LC_CTYPE="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_ALL="en_GB.UTF-8"

If you don't obtain such a display. double check the spelling of your encoding string.
Put the export command into your .profile if you want.

Please refer to :
* https://lists.ibiblio.org/sympa/arc/freetds/2007q3/022379.html
* http://developer.apple.com/documentation/Darwin/Reference/ManPages/ man3/nl_langinfo.3.html
* man locale

Hope this will help someone ;-)

Olivier



  • [freetds] Setting correct Charset on Mac os X, Olivier Amblet, 10/25/2007

Archive powered by MHonArc 2.6.24.

Top of Page