Search Postgresql Archives

Re: UTF-8 collation on Windows?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 20, 2014 at 2:24 AM, Adrian Klaver <adrian.klaver@xxxxxxxxxxx> wrote:
Alright last shot:)

Taking hint from here:

http://msdn.microsoft.com/en-us/library/x99tb11d.aspx

try:

createdb -U postgres -E utf8 -l en-US <DBNAME>

If that does not work, not sure where to go.

This won't work on Windows. Note that en-US collation name is specific to linux and in case of Windows these names are different which is where am facing issues to find the exact code page which corresponds to utf8.

Your msdn link has this mentioned which states that for code pages that require more than two bytes per character which is basically UTF8 doesn't work with setlocale command. But again its specific to the setlocale API.
               "The locale argument can take a locale name, a language string, a language string and country/region code, a code page, or a    
                language string, country/region code, and code page. The set of available locale names, languages, country/region codes, and
               code pages includes all those supported by the Windows NLS API except code pages that require more than two bytes per
               character, such as UTF-7 and UTF-8. If you provide a code page value of UTF-7 or UTF-8, setlocale will fail, returning NULL.
"

However am sure there would be some codepage which can be used in postgreSQL to set the collation to UTF8 equivalent of linux.

Please suggest? Am sure this not something new which am looking for.

Regards...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux