UTF8 server-side on Win32?

Поиск
Список
Период
Сортировка
Искать

UTF8 server-side on Win32?

От:
Alvaro Herrera <alvherre@commandprompt.com>
Дата:
Is there any way to select the UTF-8 as server-side encoding at initdb
time?

This guy reported he wasn't able to do it:

http://archives.postgresql.org/pgsql-hackers-win32/2004-11/msg00062.php

In pgsql-es-ayuda I have a guy asking how to do it as well:

http://archives.postgresql.org/pgsql-es-ayuda/2006-06/msg00561.php

Any ideas?  I don't have a Windows machine so I can't try it.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

Re: UTF8 server-side on Win32?

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Alvaro Herrera  writes:
> Is there any way to select the UTF-8 as server-side encoding at initdb
> time?

> This guy reported he wasn't able to do it:
> http://archives.postgresql.org/pgsql-hackers-win32/2004-11/msg00062.php

That was 8.0.  My recollection is we fixed it for 8.1.  You might have
to use an explicit --encoding switch, because I don't think Windows has
any locale settings that map to utf8, but I might be wrong ...
		regards, tom lane

Re: UTF8 server-side on Win32?

От:
"Magnus Hagander" <mha@sollentuna.net>
Дата:
> > Is there any way to select the UTF-8 as server-side 
> encoding at initdb 
> > time?
> 
> > This guy reported he wasn't able to do it:
> > 
> http://archives.postgresql.org/pgsql-hackers-win32/2004-11/msg00062.ph
> > p
> 
> That was 8.0.  My recollection is we fixed it for 8.1.  You 
> might have to use an explicit --encoding switch, because I 
> don't think Windows has any locale settings that map to utf8, 
> but I might be wrong ...

Yup, it was fixed in 8.1.
The installer for 8.1 will let you pick UNICODE encoding during setup.

//Magnus

Re: UTF8 server-side on Win32?

От:
Alvaro Herrera <alvherre@commandprompt.com>
Дата:
Magnus Hagander wrote:
> > > Is there any way to select the UTF-8 as server-side 
> > encoding at initdb 
> > > time?
> > 
> > > This guy reported he wasn't able to do it:
> > > 
> > http://archives.postgresql.org/pgsql-hackers-win32/2004-11/msg00062.ph
> > > p
> > 
> > That was 8.0.  My recollection is we fixed it for 8.1.  You 
> > might have to use an explicit --encoding switch, because I 
> > don't think Windows has any locale settings that map to utf8, 
> > but I might be wrong ...
> 
> Yup, it was fixed in 8.1.

Ok, thanks.

> The installer for 8.1 will let you pick UNICODE encoding during setup.

What if he uses initdb directly?


-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

Re: UTF8 server-side on Win32?

От:
"Magnus Hagander" <mha@sollentuna.net>
Дата:
> > The installer for 8.1 will let you pick UNICODE encoding 
> during setup.
> 
> What if he uses initdb directly?

Then it should be a simple "-E UNICODE", just as on unix.

//Magnus

Re: UTF8 server-side on Win32?

От:
Oswaldo Hernández <listas@soft-com.es>
Дата:
 >> > The installer for 8.1 will let you pick UNICODE encoding>> during setup.>>>> What if he uses initdb directly?>>Then it should be a simple "-E UNICODE", just as on unix.>>//Magnus

Hello, I'm the guy that post this question on psql-es-ayuda.
Thanks to Alvaro for forward here.

I would like explain the question:

I can do initdb with '-E UTF8' or '-E UNICODE' on windows without problem.

But the --locale switch do not permit set to 'Spanish_Spain.UNICODE', 'Spanish_Spain.UTF8' or 
'Spanish_Spain.65001'.

I put the locale to Spanish_Spain.1252 (Ansi encoding) and seem to work well with database encoding 
UTF8.

I'm not an encoding expert but i think that the database encoding and the right side of locale 
specification may be the same for a correct work.

Am i wrong, and -E UTF8 may cohabitate with locale windows ansi 1252 without problems?


Thanks


-- 
*****************************************
Oswaldo Hernández
oswaldo@soft-com.es
*****************************************

FAQ