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.