Re: locale and character set

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: locale and character set

Peter Eisentraut-2
Am Donnerstag, 31. März 2005 15:49 schrieb Tsirkin Evgeny:
> Is there any relation between the locale and character set?

Every locale expects a certain character set to be used.  You can find that
out using

$ LC_ALL=foo locale charmap

If you want things to function correctly, you have to use a character set that
matches the one the locale expects.

> For example if i store the data as sql_ascii can i still use the locale
> as utf-8?
> In my case i have the data stored as ascii but i just know it is
> actually utf-8 and i am doing upgrade ,

That should work, but of course you have no guarantees that the UTF-8 is
valid, so the sorting routines and others may behave erratically if they find
an error.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [hidden email] so that your
       message can get through to the mailing list cleanly
Reply | Threaded
Open this post in threaded view
|

Re: locale and character set

Peter Eisentraut-2
Am Donnerstag, 31. März 2005 16:12 schrieb Tsirkin Evgeny:
> The question is how it will behave will this eraise an error or it will
> just not sork correctly?

That depends entirely on your operating system's C library.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/



---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq