Results 1 to 3 of 3
Hi, I'm new to Linux and also this forum.
I have a bunch of .txt files on a remote server which contain tabled information (column names, entry values, comma separated). ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 09-27-2009 #1Just Joined!
- Join Date
- Sep 2009
- Posts
- 2
Problem with 'recode' - Emergency!!
Hi, I'm new to Linux and also this forum.
I have a bunch of .txt files on a remote server which contain tabled information (column names, entry values, comma separated). I use putty to connect to the server and I am supposed to create a table for each file.
When I use 'copy' statement like this:
\copy table1 from '/something/file.txt' delimiter as ','
I get the below error:
ERROR: invalid byte sequence for encoding "UTF8": 0xff
HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding".
The client encoding for the server is "UTF-8" (I used 'show client_encoding' to figure it out)
The 'file.txt' encoding is 'data' (When I type: file file.txt, I get the word "data")
I tried to change the encoding of 'file.txt' to 'UTF-8" using:
"recode UTF-8 file.txt"
But I received:
"recode: file.txt failed: Invalid input in step `UTF-8..CHAR"
Also when I used:
"recode data..UTF-8 file.txt"
I got :
No way to recode from `data' to `UTF-8'
recode: Request `data..UTF-8' is erroneous
Can anybody of you guys please help me. I still am not very clear as what the real problem is...
Thanks in advance.
- 09-27-2009 #2Linux User
- Join Date
- Jan 2007
- Location
- cleveland
- Posts
- 468
welcome to the forum
"putty" is a windows program: how can we help you with linux?the sun is new every day (heraclitus)
- 09-27-2009 #3Just Joined!
- Join Date
- Sep 2009
- Posts
- 2


Reply With Quote

