Changeset 1cffa5654f186c41c33f851ed6458734561e2dfc
- Timestamp:
- 03/15/07 18:58:45
(1 year ago)
- Author:
- Damien Fouilleul <damienf@videolan.org>
- git-committer:
- Damien Fouilleul <damienf@videolan.org> 1173981525 +0000
- git-parent:
[284187d15808b0c938991490e6c3848d6bfa0806]
- git-author:
- Damien Fouilleul <damienf@videolan.org> 1173981525 +0000
- Message:
- unicode.c, wincp.c: compile fix
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| re294c35 |
r1cffa56 |
|
| 143 | 143 | wchar_t wide[len]; |
|---|
| 144 | 144 | |
|---|
| 145 | | MultiByteToWideChar (from ? CP_UTF8 : CP_ACP, 0, string, -1, wide, len); |
|---|
| 146 | | len = 1 + WideCharToMultiByte (p->toCP, 0, wide, -1, NULL, 0, NULL, NULL); |
|---|
| | 145 | MultiByteToWideChar (from ? CP_ACP : CP_UTF8, 0, string, -1, wide, len); |
|---|
| | 146 | len = 1 + WideCharToMultiByte (from ? CP_UTF8 : CP_ACP, 0, wide, -1, NULL, 0, NULL, NULL); |
|---|
| 147 | 147 | out = malloc (len); |
|---|
| 148 | 148 | if (out == NULL) |
|---|
| 149 | 149 | return NULL; |
|---|
| 150 | 150 | |
|---|
| 151 | | WideCharToMultiByte (p->toCP, 0, wide, -1, out, len, NULL, NULL); |
|---|
| | 151 | WideCharToMultiByte (from ? CP_UTF8 : CP_ACP, 0, wide, -1, out, len, NULL, NULL); |
|---|
| 152 | 152 | return out; |
|---|
| 153 | 153 | #else |
|---|
| r9709cd0 |
r1cffa56 |
|
| 215 | 215 | return FindFallbackEncoding (psz_lang); |
|---|
| 216 | 216 | #else |
|---|
| | 217 | static char buf[16] = ""; |
|---|
| 217 | 218 | if (buf[0] == 0) |
|---|
| 218 | 219 | snprintf (buf, sizeof (buf), "CP%u", GetACP ()); |
|---|