From: | Chuck McDevitt <cmcdevitt(at)greenplum(dot)com> |
---|---|
To: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Bug with PATHs having non-ASCII characters |
Date: | 2010-01-07 00:57:23 |
Message-ID: | 2106D8DC89010842BABA5CD03FEA406101371B1DAC@EXVMBX018-10.exch018.msoutlookonline.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Just an FYI regarding this bug:
http://archives.postgresql.org/pgsql-bugs/2009-12/msg00267.php
Windows always uses UNICODE to store file and directory names.
The wide-char version of any WIN32 API call will accept or return data in UTF-16 encoded Unicode, regardless of the local environment's single-byte (MBCS) encoding settings (codepage).
So in the windows environment, at least, you can always be sure how to handle file/directory/path that includes non-ASCII characters.
It's a little bit of a pain to use the wide-char API calls from PostgreSQL, but converting UTF-16 from and to UTF-8 is pretty easy and a guaranteed 1:1 mapping.
P.s. The non-wide-char version of the Win32 API is just a bunch of wrappers that convert the char data to/from UTF-16 based on the current codepage. The wide-char API is the native one.
To force the call to the wide-char API version, you just add W to the end of the function name (adding A forces it the other way).
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2010-01-07 01:06:35 | Re: unresolved bugs |
Previous Message | Greg Stark | 2010-01-07 00:55:46 | Re: unresolved bugs |