Why it is not possible to use the UNLOAD Statement to write in a file using ENCODING 'ANSI'? example: unload select 'blabla' to 'c:\temp\mytest.txt' encoding 'UTF-8' --> OK unload select 'blabla' to 'c:\temp\mytest.txt' encoding 'UNICODE' --> OK unload select 'blabla' to 'c:\temp\mytest.txt' encoding 'ANSII' --> Error |
Because ANSI (and the misspelled ANSII) is not an actual encoding in SQL Anywhere terms but a group of code pages (and as such, different from OEM code pages). Try to use a particular code page name, say unload select 'blabla' to 'c:\temp\mytest.txt' encoding 'windows-1252' or unload select 'blabla' to 'c:\temp\mytest.txt' encoding 'cp1252' or (probably reduced to 7 bits) unload select 'blabla' to 'c:\temp\mytest.txt' encoding 'ascii' You can get a list of the supported encodings (and their many aliases) viat "dbinit -le" or even "dbinit -le+". 2
BTW, you can also use 'os_charset' as an alias for the OS charset. On Windows, that would be the ANSI charset (as opposed to the OEM charset). The Windows ANSI charset is what non-Unicode GUI applications use; the Windows OEM charset is what non-Unicode command-line / Terminal applications use. They are often different. On UNIX, the OS charset is whatever your shell is configured to use (via the LANG environment variable).
(28 Jun '22, 12:45)
John Smirnios
Replies hidden
1
> is whatever No offense, but... That is exactly how I feel about encoding, character sets and code pages in general :)
(28 Jun '22, 15:22)
Breck Carter
I'm quite sure you have forgot collations :)
(29 Jun '22, 12:38)
Volker Barth
|