santoshthankach
May 26th, 2006, 03:45 AM
Hi All,
I have function like follows:
void XYZ(char *format,...)
{
...
va_list list;
char temp[256];
va_start( list, format );
vsprintf( temp, format, list );
...
}
I need to port this function into unicode, i.e. "format" can have string containing characters from other languages. Do we have some unicode compliant (multi byte) version of APIs: va_start(), vsprintf() that can get 2 byte characters.
I did tried using "wchar_t" instead of "char" and code did got compiled after that but is the correct way of doing this.
Please let me know of your suggestions.
Thanks in advance,
Santosh Thankachan
I have function like follows:
void XYZ(char *format,...)
{
...
va_list list;
char temp[256];
va_start( list, format );
vsprintf( temp, format, list );
...
}
I need to port this function into unicode, i.e. "format" can have string containing characters from other languages. Do we have some unicode compliant (multi byte) version of APIs: va_start(), vsprintf() that can get 2 byte characters.
I did tried using "wchar_t" instead of "char" and code did got compiled after that but is the correct way of doing this.
Please let me know of your suggestions.
Thanks in advance,
Santosh Thankachan