pgsql cannot read utf8 files moved from windows correctly!
От | bookman bookman |
---|---|
Тема | pgsql cannot read utf8 files moved from windows correctly! |
Дата | |
Msg-id | 28a0e9620712172253n697db1c0rd84eab124e43dfc1@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: pgsql cannot read utf8 files moved from windows correctly!
Re: pgsql cannot read utf8 files moved from windows correctly! |
Список | pgsql-general |
H i, I copied a table in sqlserver2005 to a txt file(There were many chinese words in it).I saved it as a file encoded by ANSI,but I cant open it in ubuntu.I tried GBK,GB18030, UTF8,It just could not be opened. Then I save it in windows with encoding UTF8,then I can open it in ubuntu.I copied it to postgresql,but the file could not be read correctly.For example,here is a file: --book.txt bookid(int) bookname(varchar(30)) 1 Java I created a table "book" in postgre,then I input the command line: copy book from '/home/postgres/data/book.txt' The error was: error:invalid input syntax for integer:" 1"; context:line 1,column bookid I know that every line of utf8 files is started with "fffe" or "feff" and ended with "\r\n" in windows but not in linux,so the character "1" has a space before it in the error line. Is there any way I can transfer utf8 file in windows to linux system? Thank you!
В списке pgsql-general по дате отправления: