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

Popular posts from this blog

resizing Telegram inline keyboard -

javascript - How to bind ViewModel Store to View? -

javascript - Solution fails to pass one test with large inputs? -