diff --git a/README.md b/README.md index aea18cc..35eade4 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,45 @@ find . -name '*.cpp' -exec iconv -f EUC-KR -t UTF-8//TRANSLIT -o {}_u {} \; -exe Repeat for the desired file extensions. +## Example result + +Original File Content (read as UTF-8) + +```cpp +// this string literal should be converted +chA->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("�̰� ������ �Ⱦ���")); +// this line should stay untouched +DWORD dwOppList[8]; // �̰� ������ �Ⱦ��� +``` + +Original File Content (read as EUC-KR and converted to UTF-8) + +```cpp +// this string literal should be converted +chA->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("이거 지금은 안쓴데")); +// this line should stay untouched +DWORD dwOppList[8]; // 이거 지금은 안쓴데 +``` + +After running this script (read as UTF-8) + +```cpp +// 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")); +// this line should stay untouched +DWORD dwOppList[8]; // �̰� ������ �Ⱦ��� +``` + +After running `iconv` on the script output (read as UTF-8) + +```cpp +// 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")); +// this line should stay untouched +DWORD dwOppList[8]; // 이거 지금은 안쓴데 + +``` + ## Usage To install dependencies: diff --git a/test.cpp b/test.cpp index 8597d12..e2c7da7 100644 --- a/test.cpp +++ b/test.cpp @@ -1,4 +1,4 @@ // this string literal should be converted -chA->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("�ִ� ��Ƽ�� 8�� �̹Ƿ�..")); +chA->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("̰ Ⱦ")); // this line should stay untouched -DWORD dwOppList[8]; // �ִ� ��Ƽ�� 8�� �̹Ƿ�.. +DWORD dwOppList[8]; // ̰ Ⱦ