Given an IANA codec name (or, one of those used in iconv/ICU), what is the easiest way to determine whether the codec has a fixed width representation for characters or not?
Asked
Active
Viewed 64 times
1 Answers
1
Use ucnv_isFixedWidth()
:
UErrorCode status;
UConverter* converter = ucnv_open("koi8-r", &status);
if (U_SUCCESS(status)) {
UBool is_fixed = ucnv_isFixedWidth(converter, &status);
}

一二三
- 21,059
- 11
- 65
- 74
-
And how could I do this with 'iconv'? – Frank-Rene Schäfer Oct 03 '15 at 06:21