Itagaki Takahiro <itagaki.takah...@oss.ntt.co.jp> wrote: > "Hiroshi Saito" <z-sa...@guitar.ocn.ne.jp> wrote: > > > Um, I had a focus in help the problem which is not avoided. > > I am not sensitive to a problem being avoided depending on usage. > > However, I will wish to work spontaneously, when it is help much. > > I'll research whether encoding of filesystem path is affected by > locale settings or not in some platforms. Also, we need to research > where we should get the system encoding when the locale is set to "C", > which is popular in Japanese users.
Here is a patch to implement GetPlatformEncoding() and convert absolute file paths from database encoding to platform encoding. Since encoding of paths are converted at AllocateFile() and BasicOpenFile(), not only COPY TO/FROM but also almost of file operations are covered by the patch. Callers of file access methods don't have to modify their codes. Please test the patch in a variety of platforms. I tested it on Windows and Linux, and then I found {PG_UTF8, "ANSI_X3.4-1968"} is required for encoding_match_list in src/port/chklocale.c on Linux (FC6). Regards, --- ITAGAKI Takahiro NTT Open Source Software Center
GetPlatformEncoding.patch
Description: Binary data
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers