Board index » Visual Studio » coding for chinese

coding for chinese

Visual Studio74
Hi,



does anyone know how to get chinese characters into an app using the

resource editor ?

I am using MS Visual Studio 2005 and have Chinese fonts installed on my

PC. I can add the characters to the string table and to the menu but

when I run the code they come out as question marks like ?????



But if I hardcode the chinese characters in to SetWindowText( ), then

it comes out ok.



many thanks.


-
 

Re:coding for chinese

Checkout if the code page specified in the .rc file.



--

Vipin Aravind

blogs.explorewindows.com">blogs.explorewindows.com



"Code Spanner" <ax7007@hotmail.com>wrote in message

Quote
Hi,



does anyone know how to get chinese characters into an app using the

resource editor ?

I am using MS Visual Studio 2005 and have Chinese fonts installed on my

PC. I can add the characters to the string table and to the menu but

when I run the code they come out as question marks like ?????



But if I hardcode the chinese characters in to SetWindowText( ), then

it comes out ok.



many thanks.







-

Re:coding for chinese

I believe you have to have the correct region set through Control Panel, and

or/ edit the file outside of resource editor with something like NotePad

that can edit Unicode, then save it back. I believe that VS 2005 can edit a

Unicode RC file if you convert it first, but I don't think it creates it

Unicode straight off and it wouldn't be Unicode if you are updating a

project done in a previous version of VS.



Tom



"Code Spanner" <ax7007@hotmail.com>wrote in message

Quote
Hi,



does anyone know how to get chinese characters into an app using the

resource editor ?

I am using MS Visual Studio 2005 and have Chinese fonts installed on my

PC. I can add the characters to the string table and to the menu but

when I run the code they come out as question marks like ?????



But if I hardcode the chinese characters in to SetWindowText( ), then

it comes out ok.



many thanks.







-

Re:coding for chinese

Quote
does anyone know how to get chinese characters into an app using the

resource editor ?

I am using MS Visual Studio 2005 and have Chinese fonts installed on my

PC. I can add the characters to the string table and to the menu but

when I run the code they come out as question marks like ?????



But if I hardcode the chinese characters in to SetWindowText( ), then

it comes out ok.

Several things:

- you need Unicode application or to run on Chinese system

- Unicode rc file or edit it on Chinese system



--

Mihai Nita [Microsoft MVP, Windows - SDK]

www.mihai-nita.net">www.mihai-nita.net

------------------------------------------

Replace _year_ with _ to get the real email

-

Re:coding for chinese

hi,

thanks for the suggestions.



to display Chinese characters you need to do 2 things:-



1. Set the project and any other library projects you have to "Use

Unicode Character Set" - found in:

Properties ->Configuration Properties ->General ->Character Set.



2. Open the .rc file in a unicode compatible text editor, and save it

as Unicode.



You can now add Chinese characters by using the resource string editor

in Visual Studio 2005, build the project and display Chinese

characters.



cheers

Code Spanner.



-