× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Scott,

Why?  Why not let open() convert it for you?

That's a very god question! I've currently got an application that generates
xml data on an array of pointers. I then use open() to create the file with
the CCSID set to 819 (ASCII ISO-8859-1). I then close the file and re-open
it. So, I've got a file with CCSID = 819. As the initial open was with
O_CCSID and O_TEXTDATA set, and the second open does not specify a CCSID,
the data I write is converted from the open CCSID (37) to the file CCSID
(819).

This works fine. I've got hundreds of xml documents, all created OK.

Now, I really need the files to be created in UTF-8 (ISO-10646-1). But I
seem to have trouble here. I can create the files with CCSID 1208, but I
can't seem to write to them. I assumed that I'd need to use iconv() to
translate the data, but if open() can do the translation from CCSID 37 to
CCSID 1208 then I'd much rather do that. Is there some trick I'm missing?
How can I perform 37-819 conversion but not 37-1208? The 1208 CCSID
specification at IBM does not help - the box for CCSID is empty:
http://www-1.ibm.com/servers/eserver/iseries/software/globalization/ccsid/01
208.htm

I'm going to work on your iconv() example even if I can get open() to do the
job I want - a little more knowledge to add to the pot. :-)

Thanks
Larry         


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.