Post by PCMan 2004: http://www.geocities.co.jp/SilkRoad/4511/vb/sample/utf8dead.txt
: 好奇試著google一下,
: "看起來"要用win32 api
: 看不懂日文XD
可以試著自己轉
MultiByteToUnicode()
傳入參數要他轉成 UTF-8 應該可以
這需要先 MultibyteToUnicode() 從 ANSI 轉成 Unicode 之後
再從 Unicode 做 UnicodeToMultibyte() 轉回 UTF-8
不曉得有沒有 ANSI 直接變成 UTF-8
很久沒用,忘了
是這二個Win32 API:
1. MultiByteToWideChar
2. WideCharToMultiByte
說明:
The MultiByteToWideChar function maps a character string to a wide-character
(Unicode) string. The character string mapped by this function is not
necessarily from a multibyte character set.
int MultiByteToWideChar(
UINT CodePage, // code page
DWORD dwFlags, // character-type options
LPCSTR lpMultiByteStr, // address of string to map
int cchMultiByte, // number of bytes in string
LPWSTR lpWideCharStr, // address of wide-character buffer
int cchWideChar // size of buffer
);
CodePage:
Specifies the code page to be used to perform the conversion. This parameter
can be given the value of any code page that is installed or available in the
system. You can also specify one of the following values: Value Meaning
CP_ACP ANSI code page
CP_MACCP Macintosh code page
CP_OEMCP OEM code page
CP_SYMBOL Symbol code page (42)
CP_THREAD_ACP The current thread's ANSI code page
CP_UTF7 Translate using UTF-7
CP_UTF8 Translate using UTF-8
--
[1;36m┌─────[33m◆[37mKKCITY[33m◆[36m─────┐[1m ◢ [37m╱ [46m 想要成立班系社團站台嗎? [40m[m
[1;36m│[31m bbs.kkcity.com.tw [36m│[1m █[46m▉[40m [37m─ [33mKKcity即日起開放BBS站申請囉![m
[1;36m└──[34m《[0;37mFrom:203.204.90.144 [1;34m》[36m──┘[1m ◥ [37m╲ 免程式技術、硬體成本的選擇!![m