Skip to Content
0
Dec 03, 2008 at 01:15 PM

OPEN DATASET UTF-8

139 Views

Hi,

As a part of Unicode conversion project activities, we have changed

about 300 programs dealing with the uploading and downloading of the

files on the application server. The changes applied into these

programs are mainly with the "OPEN DATASET" syntax. Below is the new

Unicode compatible syntax added by the development team:

OPEN DATASET <outfile> FOR OUTPUT IN TEXT MODE ENCODING UTF-8 IGNORING

CONVERSION ERRORS.

(Please note that the encoding is hard coded as UTF-8)

The issue is that even though we are forcing the encoding to be

UTF-8, the format of the output file is not consistent. We are getting

two different formats i.e. Unicode UTF-8 and Western European ISO-8859,

depending whether Unicode characters like (Euro symbol), special

characters are present in the file data.

Per our observation, the file format is Western European if the data

contains only A to Z (characters) and/or 0 to 9 (numbers) & the file

format is UTF-8 for anything other than A to Z and 0 to 9.

Thanks.

Marco