S
Sam (Deleted User)
Guest
I'm writing an update for most of my extensions to support UTF-8 encoding on Windows.
So far so good, I got several functions working with UTF-8, because I'm converting the char * arguments to WCHAR before using them.
There is a roadblock however. One of my functions has a return value that needs to support UTF-8. While this normally wouldn't be an issue if I were writing a C++ application to call the DLL, it is a problem in GameMaker Studio, because GameMaker Studio limits me to only 3 return types: void, double, and char *.
char * would be the way to go on Mac and Linux, because on those platforms char * can handle UTF-8 encoding. But on Windows it's not that simple. I need to convert it first to some other type, such as WCHAR.
Since GameMaker Studio cannot use WCHAR nor any of the other types I'd need for this to work, am I pretty much out of options? Is there no way to do this?
Or is there some workaround I'm just not seeing?
Thanks!
So far so good, I got several functions working with UTF-8, because I'm converting the char * arguments to WCHAR before using them.
There is a roadblock however. One of my functions has a return value that needs to support UTF-8. While this normally wouldn't be an issue if I were writing a C++ application to call the DLL, it is a problem in GameMaker Studio, because GameMaker Studio limits me to only 3 return types: void, double, and char *.
char * would be the way to go on Mac and Linux, because on those platforms char * can handle UTF-8 encoding. But on Windows it's not that simple. I need to convert it first to some other type, such as WCHAR.
Since GameMaker Studio cannot use WCHAR nor any of the other types I'd need for this to work, am I pretty much out of options? Is there no way to do this?
Or is there some workaround I'm just not seeing?
Thanks!