COPY command file name encoding issue (UTF8/WIN1252)

Поиск
Список
Период
Сортировка
От Pujol Mathieu
Тема COPY command file name encoding issue (UTF8/WIN1252)
Дата
Msg-id 550FE0B8.70803@realfusio.com
обсуждение исходный текст
Ответы Re: COPY command file name encoding issue (UTF8/WIN1252)  (Albe Laurenz <laurenz.albe@wien.gv.at>)
Список pgsql-general
Hi,

I have a problem using COPY command with a file name containing non
ASCII characters.
I use Postgres 9.3.5 x64 on a Windows 7.
OS local encoding is WIN1252.
My database is encoded in UTF8.
I initiate client connection with libpq, connection encoding is set to UTF8.
I build properly my file path taking care of encoding.

When I run COPY "test" TO 'C:/tmp/é.bin' WITH BINARY
it creates a file named é.bin which is utf8 name interpreted as local8.
It could be reproduced convert_from(convert_to('é','UTF8'),'WIN1252').
é in UTF8 "\303\251"
é in WIN1252"\351"

This command works on a database encoded in WIN1252 (same as OS) .
So it seems that COPY command don't take care of file name encoding.
Is it a bug ? a limitation ?
Thanks for your help

Mathieu PUJOL



В списке pgsql-general по дате отправления:

Предыдущее
От: Yuri Budilov
Дата:
Сообщение: pgadmin 3 on windows 7 install
Следующее
От: Albe Laurenz
Дата:
Сообщение: Re: COPY command file name encoding issue (UTF8/WIN1252)