|
|
| version 1.3, 2004/06/14 13:35:40 | version 1.4, 2004/06/20 11:19:46 |
|---|---|
| Line 95 static void View_AddString(const char *l | Line 95 static void View_AddString(const char *l |
| int overleng; | int overleng; |
| TCHAR *p; | TCHAR *p; |
| #if defined(UNICODE) | #if defined(UNICODE) && defined(OSLANG_SJIS) |
| len = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, lpszString, -1, | len = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, lpszString, -1, |
| NULL, 0) - 1; | NULL, 0) - 1; |
| #elif defined(OSLANG_UTF8) | |
| len = ucscnv_utf8toucs2(NULL, 0, lpszString, (UINT8)-1) - 1; | |
| #else | #else |
| len = strlen(lpszString); | len = strlen(lpszString); |
| #endif | #endif |
| Line 120 static void View_AddString(const char *l | Line 122 static void View_AddString(const char *l |
| } | } |
| } | } |
| p = szView + vlen; | p = szView + vlen; |
| #if defined(UNICODE) | #if defined(UNICODE) && defined(OSLANG_SJIS) |
| MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, lpszString, -1, p, len); | MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, lpszString, -1, p, len + 1); |
| #elif defined(OSLANG_UTF8) | |
| ucscnv_utf8toucs2(p, len + 1, lpszString, (UINT8)-1); | |
| #else | #else |
| CopyMemory(p, lpszString, len); | CopyMemory(p, lpszString, len); |
| #endif | #endif |