Spool in UTF8 not always works [message #528485] |
Tue, 25 October 2011 05:03 |
|
clairvoyant22
Messages: 3 Registered: October 2011
|
Junior Member |
|
|
Hi,
I have a problem spooling flat files in utf 8. I have 3 different sql that needs to be spooled regulary in utf8 format.
the first two containing special chars is spooled without any problem, but the third that is containg only numbers and pipe-s is spooled in ansi format. |could you help me what can be the problem?
i have set nls_lang=.utf8 in my shell script, but that onlz helped at the first two sql the last doesnt work.
I have also tried to convert file using iconv command, but the output is still in ansi (only works if i put a special char in the ansi file then it converts to utf8 without problem)
if i open the file in notepad and save as utf8 then it works, but i cannnot reach the same from unix script. do u have any idea/suggestions?
thanks in advance,
clairvoyant
|
|
|
Re: Spool in UTF8 not always works [message #528490 is a reply to message #528485] |
Tue, 25 October 2011 05:12 |
ThomasG
Messages: 3211 Registered: April 2005 Location: Heilbronn, Germany
|
Senior Member |
|
|
A file with only numbers and the pipe symbol would be completely identical in UTF-8, ansi and ascii, since all symbols are below code point 127 in ASCII.
What *notepad* especially seems to do when you save a file in UTF-8 is add the (optional) Byte Order Mark (BOM) at the beginning of the file.
|
|
|
|
Re: Spool in UTF8 not always works [message #528493 is a reply to message #528491] |
Tue, 25 October 2011 05:19 |
ThomasG
Messages: 3211 Registered: April 2005 Location: Heilbronn, Germany
|
Senior Member |
|
|
I don't think it will cause any problems. It's more likely the added notepad BOM will cause problems. (At least in my experience)
Since a pure ASCII file is identical to it's UTF-8 equivalent, as long as no special characters outside the 0-127 range are use.
|
|
|
|