If your interest is in speed alone, then adding UTF_16 might offer options as
well:
FORMAT (enc_flags):
7|6|5|4|3|2|1|0
x x 0 0 1 x x x = UTF_8
x x 0 1 0 x x x = UTF_16
x x 1 0 0 x x x = UTF_32
then:

#define UTF 56

utf_encoding = UTF & enc_flags;
if( utf_encoding ) {
   cout << "String is UTF_" << utf_encoding << "\n";
}
(excuse any code errors, I haven't CPLUSPLUSed in awhile)
Grant M.


Reply via email to