unicode - How to determine whether a codec has a const ratio 'byte number per character'? -
given iana codec name (or, 1 of used in iconv/icu), easiest way determine whether codec has fixed width representation characters or not?
use ucnv_isfixedwidth()
:
uerrorcode status; uconverter* converter = ucnv_open("koi8-r", &status); if (u_success(status)) { ubool is_fixed = ucnv_isfixedwidth(converter, &status); }
Comments
Post a Comment