|
Carmen,
/free myfile = '/attachment/UTF-8.txt'; openflags = O_RDONLY + O_TEXTDATA; mode = S_IRUSR + S_IRGRP + S_IROTH; CCSID_UTF8 = 1208;
fd = open( myfile : openflags : mode : CCSID_UTF8 );
To create the file as UTF-8 you should have something like:
D O_CCSID C Const(32)
/free myfile = '/attachment/UTF-8.txt'; openflags = O_CREATE + O_WRTONLY + O_TRUNCATE + O_CCSID; mode = S_IRWXU + S_READWRITE; CCSID_UTF8 = 1208;
fd = open( myfile : openflags : mode : CCSID_UTF8);
To open a file created as UTF-8 you need to specify something like: /free myfile = '/attachment/UTF-8.txt'; openflags = O_RDONLY + O_TEXTDATA + O_CCSID; mode = S_IRUSR + S_IRGRP + S_IROTH;
fd = open( myfile : openflags : mode :0);
I hope this makes sense.
Cheers
Larry Ducie
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.