NO

Author Topic: can't support chinese string resource  (Read 7168 times)

pcce

  • Guest
can't support chinese string resource
« on: August 03, 2007, 01:47:30 PM »
This development kit is good!
But I can't use it, because the string(chinese) in the resource is turbid(random char)!
I hope it will support this perfect!
Thank you for your work for this project!

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: can't support chinese string resource
« Reply #1 on: August 03, 2007, 07:20:50 PM »
I know nothing about Chinese, so it's hard to say what is missing to make it work. Perhaps adding support for UTF-8/16/32/whatever script files may help, but it's not something I really need or looking forward to add, so ...
/Pelle

pcce

  • Guest
Re: can't support chinese string resource
« Reply #2 on: August 08, 2007, 01:30:08 PM »
please look:
I think you can find the problem and help me.




« Last Edit: August 08, 2007, 01:31:57 PM by pcce »

Offline Robert

  • Member
  • *
  • Posts: 245
Re: can't support chinese string resource
« Reply #3 on: August 08, 2007, 09:35:40 PM »
What operating system are you using?

Ngan Lo

  • Guest
Re: can't support chinese string resource
« Reply #4 on: August 10, 2007, 05:49:15 PM »
I think he is using Windows XP (Simplified Chinese ver)  :)

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: can't support chinese string resource
« Reply #5 on: August 10, 2007, 11:55:44 PM »
I will look at it. I don't have a Chinese version to test on, so don't hope too much...
/Pelle

pcce

  • Guest
Re: can't support chinese string resource
« Reply #6 on: August 11, 2007, 08:13:22 AM »
I think he is using Windows XP (Simplified Chinese ver)  :)
Yes, it's XP Simplified Chinese.

I will look at it. I don't have a Chinese version to test on, so don't hope too much...
Thank you very much!
« Last Edit: August 11, 2007, 08:23:52 AM by pcce »

Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 582
    • Homepage
Re: can't support chinese string resource
« Reply #7 on: August 11, 2007, 04:25:24 PM »
I will look at it. I don't have a Chinese version to test on, so don't hope too much...
There should be no need to use a Chinese installation, it should be enough to add a test user and set all his regional settings to Chinese.
I have done so before to duplicate a problem with another application.
---
Stefan

Proud member of the UltraDefrag Development Team

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: can't support chinese string resource
« Reply #8 on: August 12, 2007, 09:07:31 PM »
Quote from: Stefan Pendl
There should be no need to use a Chinese installation, it should be enough to add a test user and set all his regional settings to Chinese.
I have done so before to duplicate a problem with another application.
Thanks for the info - I will try that...
/Pelle

severach

  • Guest
Re: can't support chinese string resource
« Reply #9 on: August 22, 2007, 08:44:36 AM »
The problem I found for multiple non default language resource support was that PORC does not compile UTF-8 or UNICODE files with or without BOM which are the only practical ways to store characters from anything other than the localized language. I solved the problem by writing a program to translate PORC command line switches to Microsoft RC which allows RC to seamlessly integrate into POIDE.

Turns out that Microsoft RC is the only one that works. The rest are too limited, buggy, or hopelessly outdated. My tool translates the command lines for seamless IDE and makefile integration for all of the following resource compilers:

Pelles-C PORC
MinGW windres
Watcom WRC
Borland BRCC32
Digital Mars RCC

Now don't go editing those UNICODE files with the Pelles IDE. It only knows ASCII. Some fancy #include tricks keeps POIDE editing the files it should and avoiding the files it shouldn't.

I only added enough switches to make it compatible with all the IDE's and other spurious switches that I happened to notice. There might be a switch that a makefile uses that isn't supported but should be. As a programmer tool it doesn't have an install. It has a bat file that you may need to adapt to your system.

larryli

  • Guest
Re: can't support chinese string resource
« Reply #10 on: October 24, 2007, 06:56:48 AM »
I think PORC hasn't the bug (PORC can compile Chinese RC files correctly), and that's POIDE can NOT write Chinese RC files.
A Chinese character is 2 bytes likes other languages on UNICODE charset. On OEM charset (Chinese GB2312) the Chinese character is ALSO 2 bytes, but an English character is ONLY 1 byte.
So, when you use WideCharToMultiByte() to tranlate string you can get Unicode string length is half of byte size. This length is same as length on ASNI charset, but less-than Chinese charset. On Chinese OEM charset, a chinese character is 2 bytes, and the length is double of the characters.
I think Pelle must increase buffer to put enough Chinese characters.