How does it return incorrect characters?
Are you using it correctly? To use s{w}printf correctly, use element
counts (not byte counts). The function returns -1 on failure, and the
number of required character. Truncation occurs when 'required >=
given'. So:
wchar_t buffer[256]
size = COUNTOF(buff); // 256; not sizeof(x) !!!
int written = swprintf(buffer, size "%s", <some wide string>);
if(-1 == written || written >= COUNTOF(buff))
abort(); // Failed
Here's a reference, but its kind of broken since it does not tell you
about truncation:
http://www.cplusplus.com/reference/cwchar/swprintf/.
If you are defining NDK_DEBUG, you should also define _STLP_DEBUG=1
when using STLPort. You might get an assert or debug diagnostic
message.
Jeff