CP874toUTF8 utility

The CP874toUTF8 utility converts data in the CP874 character set into UTF8 collation, the only collation supported by Sybase IQ for the Thai language. You cannot load data in the CP874 character set. Instead, you must convert it to UTF8 using this utility.

Syntax

CP874toUTF8 [CP874InputFile]

Usage

You can run this utility from the command prompt only.

CP874toUTF8 reads the named file in the CP874 character set (or standard input if no files are named) and prints the UTF8 conversion to standard output.

NoteFiles with embedded NULL characters (‘\0’) are not converted correctly. Remove such characters before running this utility.

Use caution with large data files; the UTF8 output can be up to 3 times larger than the input data. Input and output file size must both be within operating system limits.

CP874toUTF8 returns a 0 exit status upon successful completion. A non-zero exit status indicates an error occurred. The CP874toUTF8 utility writes all error messages to stderr.

CP874toUTF8 calls the Sybase Unicode Infrastructure Library (Unilib®) to perform the data conversion. If Unilib cannot convert the data, CP874toUTF8 reports the following conversion errors:

uniconv_unistrFromS failed
uniutf8_unistrToUTF8 failed

If the conversion fails, divide the file into smaller sections for conversion, to isolate the point of failure. Contact Sybase Technical Support, if you are unable to resolve the problem.