src/core/windows/SDL_windows.h
changeset 6612 9a22ac8befa9
parent 6350 19545983ac76
child 6885 700f1b25f77f
child 8353 82447809a27e
equal deleted inserted replaced
6611:5c8b5b03ad8a 6612:9a22ac8befa9
    35 #include <windows.h>
    35 #include <windows.h>
    36 
    36 
    37 
    37 
    38 /* Routines to convert from UTF8 to native Windows text */
    38 /* Routines to convert from UTF8 to native Windows text */
    39 #if UNICODE
    39 #if UNICODE
    40 #define WIN_StringToUTF8(S) SDL_iconv_string("UTF-8", "UCS-2", (char *)(S), (SDL_wcslen(S)+1)*sizeof(WCHAR))
    40 #define WIN_StringToUTF8(S) SDL_iconv_string("UTF-8", "UCS-2-INTERNAL", (char *)(S), (SDL_wcslen(S)+1)*sizeof(WCHAR))
    41 #define WIN_UTF8ToString(S) (WCHAR *)SDL_iconv_string("UCS-2", "UTF-8", (char *)(S), SDL_strlen(S)+1)
    41 #define WIN_UTF8ToString(S) (WCHAR *)SDL_iconv_string("UCS-2-INTERNAL", "UTF-8", (char *)(S), SDL_strlen(S)+1)
    42 #else
    42 #else
    43 #define WIN_StringToUTF8(S) SDL_iconv_string("UTF-8", "ASCII", (char *)(S), (SDL_strlen(S)+1))
    43 #define WIN_StringToUTF8(S) SDL_iconv_string("UTF-8", "ASCII", (char *)(S), (SDL_strlen(S)+1))
    44 #define WIN_UTF8ToString(S) SDL_iconv_string("ASCII", "UTF-8", (char *)(S), SDL_strlen(S)+1)
    44 #define WIN_UTF8ToString(S) SDL_iconv_string("ASCII", "UTF-8", (char *)(S), SDL_strlen(S)+1)
    45 #endif
    45 #endif
    46 
    46