× 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.



Dirk,

Marco and Jan were both right.

First, CCSID 819 is ASCII, but XML is always Unicode; UTF-8 or UTF-16;
UTF-8 is default. So you should use CCSID 1208 (UTF-8) instead of 819.

Second, if you use O_CODEPAGE you specify a code page, of which a CCSID is
derived. For UTF-8 you need to specify the CCSID, so you need the flag
O_CCSID instead of O_CODEPAGE.

Third, the technique you use (first open the file to create it with the
right CCSD, close it and reopen it for writing) is not necessary anymore.
These days you can use flag O_TEXT_CREAT and a fifth parameter (conversion
id) on the open. That way, data you write is converted from 'conversion
is' (if you specify 0, the job CCSID is used) to the file's CCSID.

Joep Beckeringh


Dirk.Marien@xxxxxxxxxxxxxxxxx

Re: Another code page - character set issue ?

Seems that some of the info is missing in previous mail ... I'll give it

another try :

Hi all,
I have probably another code-page issue. I create an XML-file on the IFS

with following syntax:
fd = open(IFSFolder:
O_CREAT+O_WRONLY+O_CODEPAGE:
S_IWUSR+S_IRUSR+S_IRGRP+S_IROTH:
819);
callp close(fd);
fd = open(IFSFolder:O_WRONLY+O_TEXTDATA);
The file is created on IFS with following attributes:
Display Attributes
Object . . . . . . : /Tryout/IMPORT7/GI021103711364397.xml
Type . . . . . . . . . . . . . . . . . : STMF
Owner . . . . . . . . . . . . . . . . : DMA2852
System object is on . . . . . . . . . : Local
Auxiliary storage pool . . . . . . . . : 1
Object overflowed . . . . . . . . . : No
Coded character set ID . . . . . . . . : 819
Hidden file . . . . . . . . . . . . . : No
PC system file . . . . . . . . . . . . : No
Read only . . . . . . . . . . . . . . : No
Need to archive (PC) . . . . . . . . . : Yes
Need to archive (System) . . . . . . . : Yes

Now, I cannot open the file in Word (because of ‘invalid content’).
Also,
when opening in XML-SPY I see that accents (lilke é) are wrongly
converted
(replaced by weird characters, wich causes the XML to be bad-formatted):

<goodsDescription>autres, y compris les roulements combin?
/goodsDescription>
<goodsDescriptionLanguage>NL</goodsDescriptionLanguage>

Help would be much, much, much appreciated … .
Kr,
Dirk.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.