[asterisk-dev] Re: Unicode in Text frames - how to fix?

Tim Panton tim at mexuar.com
Mon Apr 30 09:10:54 MST 2007


On 30 Apr 2007, at 16:34, Benny Amorsen wrote:

>>>>>> "TP" == Tim Panton <tim at mexuar.com> writes:
>
> TP> Asterisk's handling of text frames does not support unicode. We
> TP> discovered this by accident, our Java IAX stack sends IAX text
> TP> frames in unicode (ascii is deprecated in Java) without a
> TP> terminating '\0' byte.
>
> Which Unicode? Just do UTF-8 and add the null byte.

http://www.ietf.org/internet-drafts/draft-guy-iax-03.txt
mentions UTF-8 everywhere - except in the text frame!

So should we  alter the IAX spec to specify the null byte is  
mandatory in a text
frame and drop any that don't have '\0' as the last byte?
I.e. enforce C's choices on IAX, but only in a single message type ????
Or should the IAX channel driver silently add a '\0' ?


>
> The fact that Java in its broken way decided on the worst possible
> encoding of all, UTF-16, shouldn't make us break IAX.

:-) Ah, but it helps us find bugs!

(We were converting to utf-8 just not adding the null byte.)



Tim.


More information about the asterisk-dev mailing list