pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedlocale and character set
4+ messages / 2 participants
[nested] [flat]
* locale and character set
@ 2005-03-31 13:49 Tsirkin Evgeny <tsurkin@mail.jct.ac.il>
0 siblings, 1 reply; 4+ messages in thread
From: Tsirkin Evgeny @ 2005-03-31 13:49 UTC (permalink / raw)
To: pgsql-admin
Hi list!
Is there any relation between the locale and character set?
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 ,
So i would like to leave the ascii as internal format in case there are
any non legal chars in db
but allow text search on non english characters .
Note that i don't want any server - client data conversion,i just want
the server assume that it
is dealing with utf-8.
Thanks.
Evgeny.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: locale and character set
@ 2005-03-31 13:59 Peter Eisentraut <peter_e@gmx.net>
parent: Tsirkin Evgeny <tsurkin@mail.jct.ac.il>
0 siblings, 1 reply; 4+ messages in thread
From: Peter Eisentraut @ 2005-03-31 13:59 UTC (permalink / raw)
To: Tsirkin Evgeny <tsurkin@mail.jct.ac.il>; +Cc: pgsql-admin
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/
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: locale and character set
@ 2005-03-31 14:12 Tsirkin Evgeny <tsurkin@mail.jct.ac.il>
parent: Peter Eisentraut <peter_e@gmx.net>
0 siblings, 1 reply; 4+ messages in thread
From: Tsirkin Evgeny @ 2005-03-31 14:12 UTC (permalink / raw)
To: Peter Eisentraut <peter_e@gmx.net>; +Cc: Tsirkin Evgeny <tsurkin@jct.ac.il>; pgsql-admin
Peter Eisentraut wrote:
>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.
>
>
>
Of course i understand that i was just interested in cases were no
particular charset is inforced like SQL_ASCII
but i still want the sorting and searching to work.
The question is also in such case what the server will do if it finds a
character that is not utf-8 ?
I understand from manual that it just show it's hex value ,is that right?
>>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.
>
>
>
The question is how it will behave will this eraise an error or it will
just not sork correctly?
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: locale and character set
@ 2005-03-31 15:42 Peter Eisentraut <peter_e@gmx.net>
parent: Tsirkin Evgeny <tsurkin@mail.jct.ac.il>
0 siblings, 0 replies; 4+ messages in thread
From: Peter Eisentraut @ 2005-03-31 15:42 UTC (permalink / raw)
To: Tsirkin Evgeny <tsurkin@mail.jct.ac.il>; +Cc: Tsirkin Evgeny <tsurkin@jct.ac.il>; pgsql-admin
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/
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2005-03-31 15:42 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-03-31 13:49 locale and character set Tsirkin Evgeny <tsurkin@mail.jct.ac.il>
2005-03-31 13:59 ` Peter Eisentraut <peter_e@gmx.net>
2005-03-31 14:12 ` Tsirkin Evgeny <tsurkin@mail.jct.ac.il>
2005-03-31 15:42 ` Peter Eisentraut <peter_e@gmx.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox