[Asterisk-Dev] IAX spec: Text formats and character sets

Kristian Nielsen kn at sifira.dk
Fri Apr 29 00:12:00 MST 2005


Steve Underwood <steveu at coppice.org> writes:

> There is no need to have ASCII + UTF-8. ASCII is a subset of UTF-8, so
> they are fully compatible. Its only when you have 8 bit sets, like the
> PC ones, that compatibility is an issue. Just define that all strings
> in IAX2 are UTF-8, and that is the end of it.

One problem is that strncpy(), which is used extensively in Asterisk,
cannot be used on utf8 strings. The reason is that it might truncate the
string in the middle of a multibyte character, leaving invalid utf-8
data in the destination string.

 - Kristian.

-- 
Kristian Nielsen   kn at sifira.dk
Development Manager, Sifira A/S




More information about the asterisk-dev mailing list