and now we fix the utf8 characters again

This commit is contained in:
2024-04-06 00:40:36 +02:00
parent a62715a0be
commit 9beed348d2

View File

@ -26,18 +26,18 @@ Original File Content (read as UTF-8)
```cpp ```cpp
// this string literal should be converted // this string literal should be converted
chA->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("<22>̰<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ⱦ<EFBFBD><C8BE><EFBFBD>")); chA->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("<22>̰<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ⱦ<EFBFBD><C8BE><EFBFBD>"));
// this line should stay untouched // this line should stay untouched
DWORD dwOppList[8]; // <20>̰<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ⱦ<EFBFBD><C8BE><EFBFBD> DWORD dwOppList[8]; // <20>̰<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ⱦ<EFBFBD><C8BE><EFBFBD>
``` ```
Original File Content (read as EUC-KR and converted to UTF-8) Original File Content (read as EUC-KR and converted to UTF-8)
```cpp ```cpp
// this string literal should be converted // this string literal should be converted
chA->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("?<3F><><EFBFBD><EFBFBD>? <20><>?금<>?? ?<3F><>?<3F><>?<3F><>")); chA->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("이거 지금은 안쓴데"));
// this line should stay untouched // this line should stay untouched
DWORD dwOppList[8]; // ?<3F><><EFBFBD><EFBFBD>? <20><>?금<>?? ?<3F><>?<3F><>?<3F><> DWORD dwOppList[8]; // 이거 지금은 안쓴데
``` ```
After running this script (read as UTF-8) After running this script (read as UTF-8)
@ -46,7 +46,7 @@ After running this script (read as UTF-8)
// this string literal should be converted // this string literal should be converted
chA->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("\xC0\xCC\xB0\xC5 \xC1\xF6\xB1\xDD\xC0\xBA \xBE\xC8\xBE\xB4\xB5\xA5")); chA->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("\xC0\xCC\xB0\xC5 \xC1\xF6\xB1\xDD\xC0\xBA \xBE\xC8\xBE\xB4\xB5\xA5"));
// this line should stay untouched // this line should stay untouched
DWORD dwOppList[8]; // <20>̰<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ⱦ<EFBFBD><C8BE><EFBFBD> DWORD dwOppList[8]; // <20>̰<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ⱦ<EFBFBD><C8BE><EFBFBD>
``` ```
After running `iconv` on the script output (read as UTF-8) After running `iconv` on the script output (read as UTF-8)
@ -55,8 +55,7 @@ After running `iconv` on the script output (read as UTF-8)
// this string literal should be converted // this string literal should be converted
chA->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("\xC0\xCC\xB0\xC5 \xC1\xF6\xB1\xDD\xC0\xBA \xBE\xC8\xBE\xB4\xB5\xA5")); chA->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("\xC0\xCC\xB0\xC5 \xC1\xF6\xB1\xDD\xC0\xBA \xBE\xC8\xBE\xB4\xB5\xA5"));
// this line should stay untouched // this line should stay untouched
DWORD dwOppList[8]; // ?<3F><><EFBFBD><EFBFBD>? <20><>?금<>?? ?<3F><>?<3F><>?<3F><> DWORD dwOppList[8]; // 이거 지금은 안쓴데
``` ```
## Usage ## Usage