Created
April 15, 2013 18:37
-
-
Save greg-hellings/5390284 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wchar_t* _str_to_utf16(const char *str) { | |
static sword::UTF8UTF16 filter; | |
sword::SWBuf swStr = str; | |
printf("input:\t\t%s\n", swStr.c_str()); | |
filter.processText(swStr, NULL, NULL); | |
printf("output:\t\t%ls\n", (wchar_t*)swStr.getRawData()); | |
return (wchar_t*) swStr.getRawData(); | |
} | |
extern "C" int sw_access(const char *filename, int mode) { | |
#ifdef WIN32 | |
wchar_t *wfilename = _str_to_utf16 (filename); | |
printf("wfilename:\t%ls\n", wfilename); | |
#endif | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment