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" <email@example.com> .com> cc: Sent by: Subject: iconv problems, use ASCII characters. c400-l-admin@mi drange.com 08/23/2001 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 do. 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." (message ID CZS2117). I did not notice this message prior to V5R1M0, but I could have 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 experience 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 this one out, but it seems that there should be a better way to accomplish this task. Thanks in advance, Glenn Howald Programmer/Analyst Gateway Software Corporation _______________________________________________ This is the C programming iSeries / AS400 (C400-L) mailing list To post a message email: C400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/c400-l or email: C400-Lfirstname.lastname@example.org
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.