Menu

#29 Unicode support in call info strings

ActivaTSP-1.4.7
open
None
5
2013-07-19
2013-07-19
No

I've discovered this problem while using Unicode characters in the caller id of one extension (setup in asterisk). From what I saw the asterisk manager stream is UTF-8 encoded and not ASCII encoded.

So, in order to properly pass the Unicode string trough the TAPI interface which has support for this, AddDataBlock must be fixed to use the correct source codepage that is CP_UTF8 and not CP_ACP.

STRINGFORMAT_UNICODE also needs to be set in the VARSTRING struct.

As a minor issue the function takes as a last parameter LPCSTR but when it's called a cast to LPCTSTR is done which is one and the same if you build the multibyte version but would fail if you would try to build a Unicode version but I didn't address this in my patch.

Tested the patch and now a Unicode caller id is correctly reported trough the TAPI interface.

1 Attachments

Discussion


Log in to post a comment.