If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
-
swmp
- Experienced Solver

- Posts: 84
- Joined: Tue Mar 21, 2006 1:08 pm
Post
by swmp » Wed Apr 26, 2006 8:28 am
i write the src file like this
Code: Select all
<?xml version="1.0" encoding="ISO-8859-1"?>
<resource xmlns="http://www.wxwidgets.org/wxxrc" version="2.3.0.1">
<object class="wxMenuBar" name="main_menu">
<style>wxMB_DOCKABLE</style>
<object class="wxMenu" name="file_tool_or_menuitem">
<label>_File</label>
<style>wxMENU_TEAROFF</style>
<object class="wxMenuItem" name="unload_resource_menuitem">
<label>_(汉字)\tCtrl-U</label>
<help>Unload basic dialog resource</help>
</object>
<object class="wxMenuItem" name="reload_resource_menuitem">
<label>_(汉字)\tCtrl-R</label>
<help>Reload basic dialog resource</help>
</object>
<object class="wxMenuItem" name="exit_tool_or_menuitem">
<label>E_xit\tAlt-X</label>
<help>Exit this application</help>
</object>
</object>
</resource>
the Chinese characters show as clobbers ??
thx
-
Cris
- Experienced Solver

- Posts: 58
- Joined: Thu Feb 17, 2005 2:40 pm
Post
by Cris » Wed Apr 26, 2006 9:12 am
I am not sure if you are using the correct encoding "ISO-8859-1". Supporting Chinese characters I guess you may need the encoding "UTF-8".
Cris
-
swmp
- Experienced Solver

- Posts: 84
- Joined: Tue Mar 21, 2006 1:08 pm
Post
by swmp » Wed Apr 26, 2006 9:58 am
"UTF-8" also show as clobbers
-
Cris
- Experienced Solver

- Posts: 58
- Joined: Thu Feb 17, 2005 2:40 pm
Post
by Cris » Wed Apr 26, 2006 11:48 am
If you want your widgets application to be able to show correct Chinese Characters, make sure your system has been changed to Simplified Chinese or Traditional Chinese. On Win XP->Settings->Control Panel->Regional and Language Options, change your system to Chinese, make sure you have Chinese fonts installed. (If you don't understand Chinese, you may not be able to change it back

)
Or you could change to Chinese System easily if you have a Mac.
-
swmp
- Experienced Solver

- Posts: 84
- Joined: Tue Mar 21, 2006 1:08 pm
Post
by swmp » Wed Apr 26, 2006 2:20 pm
yes , i know chinese very well,and can show Chinese characters well in the application,.
it is only the forms created by src files show Chinese characters as clobbers . n
-
chris
- I live to help wx-kind

- Posts: 150
- Joined: Fri Oct 08, 2004 2:05 pm
- Location: Europe
Post
by chris » Wed Apr 26, 2006 3:00 pm
Is wxWidgets compiled in Unicode mode?
How did you build it or which package do you use?
this->signature=NULL;
-
swmp
- Experienced Solver

- Posts: 84
- Joined: Tue Mar 21, 2006 1:08 pm
Post
by swmp » Thu Apr 27, 2006 3:01 am
I use the wxDevcpp, and wxXmlResource to read the xrc file
-
chris
- I live to help wx-kind

- Posts: 150
- Joined: Fri Oct 08, 2004 2:05 pm
- Location: Europe
Post
by chris » Thu Apr 27, 2006 7:50 am
If you are using a vanilla wxDevcpp install then you are using an ANSI build. Download and install the Unicode release devpak from
this thread and then try again.
this->signature=NULL;
-
swmp
- Experienced Solver

- Posts: 84
- Joined: Tue Mar 21, 2006 1:08 pm
Post
by swmp » Fri Apr 28, 2006 2:36 am
i try to install the /wxWidgets262_unicode_gcc.DevPak and wxWidgets262_unicode_debug_gcc.DevPak, but they both show this

-
swmp
- Experienced Solver

- Posts: 84
- Joined: Tue Mar 21, 2006 1:08 pm
Post
by swmp » Fri Apr 28, 2006 2:51 am
when i compile in msvc6 in win32 Unicode Release, the exe show Chinese characters well . but the wxDevcpp??
-
chris
- I live to help wx-kind

- Posts: 150
- Joined: Fri Oct 08, 2004 2:05 pm
- Location: Europe
Post
by chris » Fri Apr 28, 2006 7:43 am
If it works with Visual C++ in Unicode mode, then it's indeed an Unicode issue. Installing a Unicode devpack for wxDevCpp should make it work there, too. I honestly don't know why you are getting this error message, so I propose you ask for help in the
wxDevCpp subforum on this board.
Good luck!
this->signature=NULL;
-
lowjoel
- Moderator

- Posts: 1511
- Joined: Sun Jun 19, 2005 11:37 am
- Location: Singapore
-
Contact:
Post
by lowjoel » Fri Apr 28, 2006 8:11 am
my devpaks (see the wxDev-C++ for Visual C++ thread in the wxDevC++ forum) are built with Unicode support, you can use them. But please read the readme in the thread.
-
swmp
- Experienced Solver

- Posts: 84
- Joined: Tue Mar 21, 2006 1:08 pm
Post
by swmp » Sat Apr 29, 2006 3:51 am