Page 1 of 1

why the Chinese characters show as clobbers using xml

Posted: Wed Apr 26, 2006 8:28 am
by swmp
i write the src file like this

Code: Select all

<?xml version="1.0" encoding="ISO-8859-1"?>

<resource xmlns="" version="">

<object class="wxMenuBar" name="main_menu">
    <object class="wxMenu" name="file_tool_or_menuitem">
        <object class="wxMenuItem" name="unload_resource_menuitem">
            <help>Unload basic dialog resource</help>
        <object class="wxMenuItem" name="reload_resource_menuitem">
            <help>Reload basic dialog resource</help>
        <object class="wxMenuItem" name="exit_tool_or_menuitem">
            <help>Exit this application</help>


the Chinese characters show as clobbers ??



Posted: Wed Apr 26, 2006 9:12 am
by Cris
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".


Posted: Wed Apr 26, 2006 9:58 am
by swmp
"UTF-8" also show as clobbers


Posted: Wed Apr 26, 2006 11:48 am
by Cris
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 :lol: )

Or you could change to Chinese System easily if you have a Mac.

Posted: Wed Apr 26, 2006 2:20 pm
by swmp
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

Posted: Wed Apr 26, 2006 3:00 pm
by chris
Is wxWidgets compiled in Unicode mode?
How did you build it or which package do you use?

Posted: Thu Apr 27, 2006 3:01 am
by swmp
I use the wxDevcpp, and wxXmlResource to read the xrc file

Posted: Thu Apr 27, 2006 7:50 am
by chris
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.

Posted: Fri Apr 28, 2006 2:36 am
by swmp
i try to install the /wxWidgets262_unicode_gcc.DevPak and wxWidgets262_unicode_debug_gcc.DevPak, but they both show this

Posted: Fri Apr 28, 2006 2:51 am
by swmp
when i compile in msvc6 in win32 Unicode Release, the exe show Chinese characters well . but the wxDevcpp??

Posted: Fri Apr 28, 2006 7:43 am
by chris
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!

Posted: Fri Apr 28, 2006 8:11 am
by lowjoel
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.

Posted: Sat Apr 29, 2006 3:51 am
by swmp
i sloved it by using this

Code: Select all


and ... =east+asia