Subject | UDF written in Visual Studio C giving "malformed string" on accents in characters |
---|---|
Author | |
Post date | 2019-09-20T19:22:10Z |
I have a UDF that needs to takes a couple of CSTRING(255) arguments and returns CSTRING(8000), but it needs to be able to handle accented characters like in French..
The UDF is written in C and compiled in MS Visual Studio, using the normal "char" character type. I tried changing that to wchar_t but that just completely broke it - you could call it successfully, but the result was wrong. (I also changed the data type definitions in the external function declaration when I did that to "CSTRING(len) CHARACTER SET UTF8" but that didn't help.)
Any suggestions of how to change the C code and/or the compiler options and/or the external function declaration to make this all work?
Our DB is all UTF8 data, though in fact that UDF doesn't access the data in the DB.
Thank you.