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



jt wrote:
| -----Original Message-----
| [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Scott Klement

<snip some Good stuff>

| For the iconv() example, to use UTF-8, you need to define a larger output
| buffer, and also a separate variable for the output buffer's length.  The
| reason is that UTF-8 can vary between 1-4 bytes per character.

Up to 4 bytes?  Did NOT know that.  You mean to tell me the are practical
uses for a Codepage or CCSID that encompasses > 64K characters??  Just
wondering what that would be, as (at least used ta) view DBCS as sufficient.


Although the most commonly used characters are in the first 64K range, there are indeed more than 64K unicode characters.


Strictly speaking, one character may occupy from 1 to *6* bytes in UTF-8 representation. The following table shows how characters are encoded in UTF-8:

Unicode Char       UTF-8 representation
-----------------  -----------------------------------------------------
00000000-0000007F: 0xxxxxxx
00000080-000007FF: 110xxxxx 10xxxxxx
00000800-0000FFFF: 1110xxxx 10xxxxxx 10xxxxxx
00010000-001FFFFF: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
00200000-03FFFFFF: 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
04000000-7FFFFFFF: 1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx

See <http://www.cl.cam.ac.uk/~mgk25/unicode.html> for more on Unicode.

Cheers! Hans


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