Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Need to use the new UCS-2-INTERNAL encoding for windows strings

  • Loading branch information
slouken committed Oct 29, 2012
1 parent f543bba commit aed432b22727bd396cacfb29c6788bf5dab0b0b1
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/windows/SDL_windows.h
@@ -37,8 +37,8 @@

/* Routines to convert from UTF8 to native Windows text */
#if UNICODE
#define WIN_StringToUTF8(S) SDL_iconv_string("UTF-8", "UCS-2", (char *)(S), (SDL_wcslen(S)+1)*sizeof(WCHAR))
#define WIN_UTF8ToString(S) (WCHAR *)SDL_iconv_string("UCS-2", "UTF-8", (char *)(S), SDL_strlen(S)+1)
#define WIN_StringToUTF8(S) SDL_iconv_string("UTF-8", "UCS-2-INTERNAL", (char *)(S), (SDL_wcslen(S)+1)*sizeof(WCHAR))
#define WIN_UTF8ToString(S) (WCHAR *)SDL_iconv_string("UCS-2-INTERNAL", "UTF-8", (char *)(S), SDL_strlen(S)+1)
#else
#define WIN_StringToUTF8(S) SDL_iconv_string("UTF-8", "ASCII", (char *)(S), (SDL_strlen(S)+1))
#define WIN_UTF8ToString(S) SDL_iconv_string("ASCII", "UTF-8", (char *)(S), SDL_strlen(S)+1)

0 comments on commit aed432b

Please sign in to comment.