他们表示,utf-8支持取决于操作系统的能力,以及它在每个LC_COLLATE和LC_CTYPE选项之间的差异。
当我使用pdAdmin III创建数据库时,有3个选项C,Posix和English_United States.1252。 C,Posix和English_United States之间的区别是什么?
我想要支持所有语言的工作,那就是unicode utf-8,这似乎不是一个选择。
An important restriction,however,is
that each database’s character set
must be compatible with the database’s
LC_CTYPE (character classification)
and LC_COLLATE (string sort order)
locale settings. For C or POSIX
locale,any character set is allowed,
but for other locales there is only
one character set that will work
correctly. (On Windows,UTF-8
encoding can be used with any locale.)
我看到可能你在Windows主机(英语_United States.1252语言环境)下有Postgresql,所以你可以使用任何这些(Posix与C相同,意思是“no locale”),读取22.1. Locale Support:
Locale support refers to an
application respecting cultural
preferences regarding alphabets,
sorting,number formatting,etc.If you want the system to behave as if
it had no locale support,use the
special locale C or POSIX.
编辑:
Windows平台不符合POSIX标准,因此您应该为该平台使用C语言环境。我不知道为什么安装程序有POSIX选项(我猜这是一个bug):
要创建没有区域设置的新集群,您可以简单地使用–no-locale开关,例如:
initdb --no-locale -E UTF-8 C:\pgdata