Changeset 95043 in vbox
- Timestamp:
- May 19, 2022 11:52:24 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/testcase/tstUtf8.cpp
r95041 r95043 44 44 #include <iprt/uuid.h> 45 45 46 #ifdef RT_OS_WINDOWS 47 # include <iprt/win/windows.h> /* For GetACP(). */ 48 #endif 46 49 47 50 … … 1473 1476 * Try trigger a VERR_NO_TRANSLATION error in convert to 1474 1477 * current CP to latin-1. 1475 */ 1478 * 1479 * On Windows / DOS OSes this is codepage 850. 1480 * 1481 * Note! On Windows-y systems there ALWAYS are two codepages active: 1482 * the OEM codepage for legacy (console) applications, and the ACP (ANSI CodePage). 1483 * 'chcp' only will tell you the OEM codepage, however. 1484 */ 1485 1486 /* Unicode code points (some of it on 2300-23FF -> misc. technical) to try. */ 1476 1487 const RTUTF16 s_swzTest1[] = { 0x2358, 0x2242, 0x2357, 0x2359, 0x22f9, 0x2c4e, 0x0030, 0x0060, 1477 1488 0x0092, 0x00c1, 0x00f2, 0x1f80, 0x0088, 0x2c38, 0x2c30, 0x0000 }; … … 1479 1490 int rc = RTUtf16ToUtf8(s_swzTest1, &pszTest1); 1480 1491 RTTESTI_CHECK_RC_RETV(rc, VINF_SUCCESS); 1492 1493 #ifdef RT_OS_WINDOWS 1494 UINT const uACP = GetACP(); 1495 RTTestIPrintf(RTTESTLVL_ALWAYS, "Current Windows ANSI codepage is: %u%s\n", 1496 uACP, uACP == 65001 /* UTF-8 */ ? " (UTF-8)" : ""); 1497 #endif 1481 1498 1482 1499 RTTestSub(hTest, "VERR_NO_TRANSLATION/RTStrUtf8ToCurrentCP");
Note:
See TracChangeset
for help on using the changeset viewer.