diff options
author | michi_cc <michi_cc@openttd.org> | 2013-08-05 20:36:55 +0000 |
---|---|---|
committer | michi_cc <michi_cc@openttd.org> | 2013-08-05 20:36:55 +0000 |
commit | 765e7d349e1d9b20fda640672a2e6864db4d8b08 (patch) | |
tree | d334951f7bb5e6b6f222450976b584d420b05c3a /src/os/windows/win32.h | |
parent | 63332afcf0d5124b6902db406ce1e629b817cf7e (diff) | |
download | openttd-765e7d349e1d9b20fda640672a2e6864db4d8b08.tar.xz |
(svn r25676) -Fix: [Win32] The ANSI code page is not UTF-8 for non-Unicode builds.
Diffstat (limited to 'src/os/windows/win32.h')
-rw-r--r-- | src/os/windows/win32.h | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/os/windows/win32.h b/src/os/windows/win32.h index f4b03d970..45bcff10a 100644 --- a/src/os/windows/win32.h +++ b/src/os/windows/win32.h @@ -23,21 +23,14 @@ TCHAR *convert_to_fs(const char *name, TCHAR *utf16_buf, size_t buflen, bool con /* Function shortcuts for UTF-8 <> UNICODE conversion. When unicode is not * defined these macros return the string passed to them, with UNICODE - * they return a pointer to the converted string. The only difference between - * XX_TO_YY and XX_TO_YY_BUFFER is that with the buffer variant you can - * specify where to put the converted string (and how long it can be). Without - * the buffer and internal buffer is used, of max 512 characters */ + * they return a pointer to the converted string. These functions use an + * internal buffer of max 512 characters. */ #if defined(UNICODE) # define MB_TO_WIDE(str) OTTD2FS(str) -# define MB_TO_WIDE_BUFFER(str, buffer, buflen) convert_to_fs(str, buffer, buflen) # define WIDE_TO_MB(str) FS2OTTD(str) -# define WIDE_TO_MB_BUFFER(str, buffer, buflen) convert_from_fs(str, buffer, buflen) #else -extern uint _codepage; // local code-page in the system @see win32_v.cpp:WM_INPUTLANGCHANGE # define MB_TO_WIDE(str) (str) -# define MB_TO_WIDE_BUFFER(str, buffer, buflen) (str) # define WIDE_TO_MB(str) (str) -# define WIDE_TO_MB_BUFFER(str, buffer, buflen) (str) #endif HRESULT OTTDSHGetFolderPath(HWND, int, HANDLE, DWORD, LPTSTR); |