cht電腦資訊Windows
adm Find login register

Visual Studio 的 default character encoding

eliu
1 Visual Studio 的 default character encoding
Promote 0 Bookmark 02008-02-22quote  

Visual Studio 的 default character encoding 內定是 unicode,此 unicode 似乎是 UTF-16,用起來似乎很麻煩。

如果要改成 UTF-8,似乎是選多位元組字集。

edited: 1
eliu
2
Promote 0 Bookmark 02008-06-13quote  

搞半天,原來 windows 的 multy-byte characeter set 只支援  2-byte 的,UTF-8 不支援,看來 WINDOWS 的多國語言支援還是很遜。string function 都要弄兩套,ascii or wide character(UTF-16),煩死了。如果支援 UTF-8,那些 wide character 的 function 大概很少人要用, debug 太麻煩了。  ASCII 的 characters 在 UTF-8 不變的。

linux GTK 就只用UTF-8. 

msdn setlocale

The set of available languages, country/region codes, and code pages includes all those supported by the Win32 NLS API except code pages that require more than two bytes per character, such as UTF-7 and UTF-8. If you provide a code page like UTF-7 or UTF-8, setlocale will fail, returning NULL. The set of language and country/region codes supported by setlocale is listed in Language and Country/Region Strings.

edited: 5
eliu
3
Promote 0 Bookmark 02008-06-19quote  

我是用MBCS, 原本以為只需要把 UTF-16 string 傳給 SendMessageW 就可顯示。沒想到並不是這樣,Big5以外的字還是不顯示,變成問號。

難道一定要把 project 設定成UNCODE,可是這樣就要改很多。能不能只有某些部份可以顯示 UNICODE ?

edited: 4

cht電腦資訊Windows
adm Find login register
views:11150