|
You should be able to take the Unicode string character by character
and put it into a char variable, which is 16 bits. Check the numeric
value of the char. If GT 127, then it's a double byte.
I also wonder how helpful persisting only half a string will be.
You do know that the AS/400 now supports UTF-8, right? Of course,
that may not be an option; don't know your app. HTH,
I also think that, unless you've got things set up really funny, you should not get an "sql statement overflowing the field." I'd expect a data truncation warning, which you can program to ignore, sort of getting automatic trimming.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.