Changeset 93640 in vbox for trunk/src/VBox
- Timestamp:
- Feb 7, 2022 2:02:44 PM (3 years ago)
- Location:
- trunk/src/VBox/Runtime/r3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/posix/utf8-posix.cpp
r93544 r93640 693 693 } 694 694 695 696 RTR3DECL(int) RTStrConsoleCPToUtf8Tag(char **ppszString, const char *pszString, const char *pszTag) 697 { 698 return RTStrCurrentCPToUtf8Tag(ppszString, pszString, pszTag); 699 } -
trunk/src/VBox/Runtime/r3/win/utf8-win.cpp
r93115 r93640 117 117 } 118 118 119 120 RTR3DECL(int) RTStrCurrentCPToUtf8Tag(char **ppszString, const char *pszString, const char *pszTag) 119 static int rtStrCPToUtf8Tag(char **ppszString, const char *pszString, uint32_t uCodePage, const char *pszTag) 121 120 { 122 121 Assert(ppszString); … … 143 142 */ 144 143 int rc; 145 int cwc = MultiByteToWideChar( CP_ACP, 0, pszString, -1, NULL, 0);144 int cwc = MultiByteToWideChar((UINT)uCodePage, 0, pszString, -1, NULL, 0); 146 145 if (cwc > 0) 147 146 { … … 155 154 * Do the translation. 156 155 */ 157 if (MultiByteToWideChar( CP_ACP, 0, pszString, -1, pwszString, cwc) > 0)156 if (MultiByteToWideChar((UINT)uCodePage, 0, pszString, -1, pwszString, cwc) > 0) 158 157 { 159 158 /* … … 183 182 } 184 183 184 185 RTR3DECL(int) RTStrCurrentCPToUtf8Tag(char **ppszString, const char *pszString, const char *pszTag) 186 { 187 return rtStrCPToUtf8Tag(ppszString, pszString, CP_ACP, pszTag); 188 } 189 190 191 RTR3DECL(int) RTStrConsoleCPToUtf8Tag(char **ppszString, const char *pszString, const char *pszTag) 192 { 193 return rtStrCPToUtf8Tag(ppszString, pszString, GetConsoleCP(), pszTag); 194 }
Note:
See TracChangeset
for help on using the changeset viewer.