|
kristof.anthonis@xxxxxx wrote: > > I 'm having problems to find a way to convert a string containing > unicode to normal characters. > For examle I'm getting data '006E' and I want to translate this into > character 'n'. > I know if I declare the following; > D X 1C inz(U'006E') > X will contain 'n'. > So the I-series is capable of doing so. But in this case '006E' is > hard-coded. What about data > wich I receive in stream??? How can I convert that? > You can use %CHAR to convert from UCS-2 to character. D X s 1C inz(U'006E') D chr s 1A D stringC s 5000C D stringA s 5000A varying chr = %char(x) stringA = %char(%subst(stringC : 1 : numberOfUcs2Chars)) The number of Ucs2 chars is half the number of bytes.
As an Amazon Associate we earn from qualifying purchases.
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.