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



Hi,

The original file hast CCSID 273

Mit freundlichen Grüßen / Kind regards / Bien à vous,

Seán Courtney – 0172-8560663

Zunächst geplante Abwesenheiten
____
Eiresoft Software Solutions





-----Original Message-----
From: Daniel Gross <daniel@xxxxxxxx>
Sent: Tuesday, 31 March 2026 14:49
To: rpg400-l@xxxxxxxxxxxxxxxxxx
Cc: scourtney@xxxxxxxxxxx
Subject: Re: Issues with code page conversion..grateful for any help

Hi Sean,

is the original data in the correct CCSID?

I would give it a try

dcl-s origVal varchar(100) ccsid(870) inz('Zakład');
dcl-s utf8Val varchar(100) ccsid(*utf8) inz;

utf8Val = origVal;
origVal = utf8Val;

And debug this step by step. What is in those 2 strings? Are the values correct?

In the next step, try to write origVal to a test-file with IFS_WRITE_UTF8 - and compare.

If the CCSIDs are correct, you shouldn't have problems with UTF8 and other CCSIDs.

HTH
Daniel

P.S.: can you post the hex values of the original value (in CCSID 870) and the UTF8 value please?


Am 31.03.2026 um 14:34 schrieb scourtney@xxxxxxxxxxx:

Hi Daniel,

Firstly, thank you for your reply ...

That is what I thought as well but it does not seem to be so simple...

If I look at the data with ccsid 273 I get this "Zakªad" and with ccsid 870 I get 'Zakład'

If I write the data to UFT-8 File with ccsid 1208 I get the wrong output.

How do I get the correct value to my output file... Ideas appreciated.


Mit freundlichen Grüßen / Kind regards / Bien à vous,

Seán




-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of
Daniel Gross
Sent: Monday, 30 March 2026 19:46
To: rpg400-l@xxxxxxxxxxxxxxxxxx
Subject: Re: Issues with code page conversion..grateful for any help

Hi Sean,

with UTF-8 there is no such thing as a codepage anymore - because UTF-8 is short for "Unicode Transfer Format 8 Bit" - so this is full Unicode.

If you want your file to be written with a specific CCSID, you have to use QSYS2.IFS_WRITE with the FILE_CCSID parameter.

You can also use this function for UTF-8 - that would be FILE_CCSID=>1208 then - as CCSID 1208 would be UTF-8.

HTH
Daniel


Am 30.03.2026 um 19:01 schrieb scourtney@xxxxxxxxxxx:

Hello all,



I am using “QSYS2.IFS_WRITE_UTF8” to generate a UTF8 Output file.



So far so good … I have data with Polish special characters that must
be sent with correct CCSID (870)



I use



EXEC SQL SET :chr870 = CAST(:myData AS CHAR(100) CCSID 870) to convert my data to CCSID 870 but when I write

To my output file the special characters are not written correctly.



Any ides on how to write these special characters to UTF8 without
losing the code page …

I have tried a few things but no success yet… I am hoping the CCSID guru’s out there have a few ideas for me.





Mit freundlichen Grüßen / Kind regards / Bien à vous,



Sean



--
This is the RPG programming on IBM i (RPG400-L) mailing list To post
a message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.

--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a
message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.


--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a
message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

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