Archicad C++ API
About Archicad add-on development using the C++ API.

ApiDevKit 5.1 & 5.2 Bug Report

Anonymous
Not applicable
Well, I successfully created a test add-on according to Karl's tutorial. But I found a bug in GSLocalization.h which installed in "API Development Kit 5\Support\Inc" folder.

At line 63, the codes is :
#define		WIN_LANGUAGE_ID		0x404
Unfortunately, the language ID 0x404 is Traditional Chinese (Taiwan), not Simple Chinese (PRC, ID = 0x804). It is a serious problem although it may caused by mistake.

I want GS fix the bug as soon as possible.
9 REPLIES 9
Karl Ottenstein
Moderator
Wolf wrote:
Unfortunately, the language ID 0x404 is Traditional Chinese (Taiwan), not Simple Chinese (PRC, ID = 0x804). It is a serious problem although it may caused by mistake.

I want GS fix the bug as soon as possible.
Thanks for your post. I haven't done any localization, so don't know to what extent the values in that header file matter. Could you explain how this affects you?

If you write your resource files in Chinese, and have your computer set up to display the proper character set / code page, are you saying that your text doesn't appear correctly? If you change the ID value in the header file does it make a difference?

Or, are you saying that the Chinese version of ArchiCAD itself is localized improperly for the People's Republic of China? (...which would not be an issue for this forum, but something that the Graphisoft marketing department needs to know.)

Are Simple and Traditional Chinese dialects or are they different writing (typography / glyph / pictograph) systems?

Thanks,

Karl

PS Report any bugs to: developer-support@graphisoft.hu
One of the forum moderators
AC 28 USA and earlier   •   macOS Sequoia 15.2, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
Akos Somorjai
Graphisoft
Graphisoft
Thanks for the info. I entered the bug into our database (bug #37239), and shall try to fix it in the ArchiCAD 9 timeframe.

Could you please provide the other two constants as well?

Tx,

Akos
Anonymous
Not applicable

Does Akos Somorjai work for GS?
It seems Graphisoft has a high efficiency. I have not send the problem to GS yet.

And do you point to constants INTERNAL_NAME and ORIGINAL_NAME? Well, I do it like this:

In myTestfix.grc file:

@ #define CHI__APP
@ #define INTERNAL_NAME "myTest.apx"
@ #define ORIGINAL_NAME "myTest.apx"

@ #include "GSLocalization.h"
...
I don't know whether I am right or not. I tried to find the correct syntax both in documents and examples, but never get result. It seems that all of the examples were coded long time ago, without the wizard.

And.....To fix the bug, you just need:
1)Open "GSLocalization.h"
2)Go to line 63
3)Replace 0x404 with 0x804
4)Save
5)Repackage all files and release it.
Why you resolve the bug several months later?
Anonymous
Not applicable
Karl, thanks for reply. Why always you reply?

I want to post some pictures, but I use Simple Chinese version of Microsoft Windows 2000 professional, the content of some strings is Chinese. I don't think most of members in this forum know Chinese. So I write the explains in text. I wish I explained clearly.

The bug has no relationship with my computer setting (hardware or software, even if Archicad or Visual C++). As far as know, only the predefined constant is wrong up to now. So my source can be compiled and linked successfully, and my addon runs well.

How the bug affects me? It leads to a wrong language info about DLL version in windows shell extension. You can right click on a certain DLL/EXE file with full info, then select attribute (or property? I don't know. I use Simple Chinese version of Windows only). Then you can see file attribute dialog. Click Version tab, you can find a item with the name "language". For example, language ID of GSReport.exe (version 8.1) is English(America).
You can set the language ID for a common EXE/DLL project by pressing Alt+F7 and the click at Resource tab. The language ID for English(America) is 0x409.
Karl wrote:
If you write your resource files in Chinese, and have your computer set up to display the proper character set / code page, are you saying that your text doesn't appear correctly? If you change the ID value in the header file does it make a difference?
I write my resource files in English. I write strings in Chinese only. And I use Windows 2000 Professional, Simple Chinese version. All Double-byte character display correctly.
Oh, I can not see the angle symbol in Archicad.
Karl wrote:
Or, are you saying that the Chinese version of ArchiCAD itself is localized improperly for the People's Republic of China? (...which would not be an issue for this forum, but something that the Graphisoft marketing department needs to know.)
No. Only ApiDevKit has bug. And there is no Chinese version of ArchiCAD recent years. I heard that the last Simple Chinese version of ArchiCAD was released more than ten years ago.
Karl wrote:
Are Simple and Traditional Chinese dialects or are they different writing (typography / glyph / pictograph) systems?
Oh. It is a long story. And my English is poor, I can not tell you the whole story in English with exact word. But I want to try it.

Chinese is a type of hieroglyphic (glyph? I don't know). The primary different between Simple Chinese and Traditional Chinese is the stroke. Strokes of Traditional Chinese Characters is more complex than Simple Chinese. We all use Tradintional Chinese one hundred years ago.
But in 1842 we are forced to cede Hongkong to UK. And then we also lost Macao in 1887. People in Hongkong and Macao can not keep in tough with Chinese Mainland freely. So they use their own terms although we recede Hongkong and Macao 80s last century. For example, to cal area of room, they are used to square feet while we (PRC) are used to square meter, etc.
Taiwan... Cause of China Civil War, Kuomintang controls Taiwan while CCP controls the Chinese Mailand. At that time, people are almost illiteracy. To improve education level rapidly, RPC goverment decided to make Chinese characters simple. That is Simple Chinese.

That is all. I don not want bring polity to this technical forum. I wish I explained clearly.
LiHigh
Newcomer
I can understand clearly. Sure others will have no problem with it.
Howard Phua

Win 10, Archicad 19 INT
Akos Somorjai
Graphisoft
Graphisoft
Wolf wrote:

Does Akos Somorjai work for GS?
It seems Graphisoft has a high efficiency. I have not send the problem to GS yet.

And do you point to constants INTERNAL_NAME and ORIGINAL_NAME? Well, I do it like this:

In myTestfix.grc file:

@ #define CHI__APP
@ #define INTERNAL_NAME "myTest.apx"
@ #define ORIGINAL_NAME "myTest.apx"

@ #include "GSLocalization.h"
...
I don't know whether I am right or not. I tried to find the correct syntax both in documents and examples, but never get result. It seems that all of the examples were coded long time ago, without the wizard.

And.....To fix the bug, you just need:
1)Open "GSLocalization.h"
2)Go to line 63
3)Replace 0x404 with 0x804
4)Save
5)Repackage all files and release it.
Why you resolve the bug several months later?
Yes indeed, I've been working for GS (since 1990 if you're interested)

And I was talking about the 'WIN_CHARSET_ID' (should be 936) and the 'WIN_LANGCHARSET_STR' string (should be "080403a8"). I have already found those in the MSDN documentation, so don't bother looking them up.

Just FYI: fixing that simple bug would require repackaging the devkit both on Mac and Windows, testing the installation, virus checking, and uploading the new files to the web site. This process would also involve about 5 people, and take nearly a man-day. Gosh, isn't GS a big company...

As an alternative, you can simply change the constant in your copy of the file (which you already did, I guess).

And don't feel bad about your English (there's no such thing as one ultimate 'English' language anyway, just see a British, an American, and an Australian trying to understand each other).
Anonymous
Not applicable
I study C++ several times and I am still a newbie up to now. I can write some codes which not too complex. I don't know any tip or trick.

So I do not know the two constants yoiu talked about.

Thanks for your encouragement.
Karl Ottenstein
Moderator
Wolf wrote:
Karl, thanks for reply. Why always you reply?
I'm the (volunteer) Developer Forum moderator and so am supposed to try to reply if someone else hasn't yet ... although frequently I remain silent when I am hoping that one of the experienced developers or someone from GS will answer!

Thank you very much for your explaining the difference between Traditional and Simple Chinese! Your English is just fine, and your comments were very informative.

I'm posting a snapshot of an apx properties dialog just for the archives to show the Language field that you mention.

Thank you,
Karl

PS The constants that Akos mentions are the other two constants in the header file that you edited.
One of the forum moderators
AC 28 USA and earlier   •   macOS Sequoia 15.2, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
Anonymous
Not applicable
Yeah!!! You got it.