use  "#pragma convert(<code page>)" statement

Best regards
    Alexei Pytel

"The better is the worst enemy of the good"

                    "Glenn Howald"
                    <ghowald@gscweb       To:     "C-400 List" 
                    .com>                 cc:
                    Sent by:              Subject:     iconv problems, use 
ASCII characters.

                    09:21 AM
                    Please respond
                    to c400-l

Dear All,

I am in a bit of a jam, otherwise I would continue lurking like I usually

I am wanting to use ASCII character strings internally in a C module I am
working on. When I compile it with a target CCSID of any of a few ASCII
CCSID's, the compiler tells me "ASCII target CCSID is not allowed."
ID CZS2117). I did not notice this message prior to V5R1M0, but I could
overlooked it in the earlier stuff I was doing. Is there a way to use ASCII
or Unicode or some character set other than EBCDIC internally in C modules
on the AS/400?

Failing to get the compiler to automatically use ASCII strings, I tried to
use the iconv Code Conversion API. After a couple false starts, I get it to
return with no errors, but my output buffer is still filled with null
characters (unchanged from its allocated state). Does anyone have
using the iconv API or have a better method for translating strings between
character sets?

I will probably end up calling QDCXLATE if it turns out I cannot figure
one out, but it seems that there should be a better way to accomplish this

Thanks in advance,

Glenn Howald
Gateway Software Corporation

This is the C programming iSeries / AS400 (C400-L) mailing list
To post a message email:
To subscribe, unsubscribe, or change list options,
or email:

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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

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