I quickly hacked together a ansi to utf8 converter using the WinApi. Will need some cleanup that I will do on the weekend when I have more freetime.
Not sure what can be used for unix systems, probably iconv.
Now the problem is:
As you know the RPG Maker 2000/2003 is an old windows application. It does not support unicode. So the codepage of the system is used. That means when you want to play a russian rpg game on a spanish windows it will not work (okay it will work but the chars will be all garbage). How do we want to solve this? I suggest to use the system codepage by default and allow an optional overwrite via a setting in the rpg_rt.ini.
And another thing:
Does anybody know what codepage the windows had that Don Miguel used for his sample game?
At the beginning it has a English or Russian language selector but I cant get the russian chars to display correct. Codepage Table
Codepage 28595 results in the following output but the russian text does not really say english or russian
Hello everybody.
After some time using only the Windows version to test, I decided to make a build for Dingoo, but I get the following result:
...player/src/surface.h:191: error: 'std::wstring' has not been declared
...player/src/surface.h:203: error: 'std::wstring' has not been declared
...player/src/surface.h:212: error: 'std::wstring' has not been declared
What a surprise eh, it seems that we do not have support for std::wstring on dingoo-linux…
For now, I have no idea how to solve this problem
[quote=“Shin-NiL”]Hello everybody.
After some time using only the Windows version to test, I decided to make a build for Dingoo, but I get the following result:
...player/src/surface.h:191: error: 'std::wstring' has not been declared
...player/src/surface.h:203: error: 'std::wstring' has not been declared
...player/src/surface.h:212: error: 'std::wstring' has not been declared
What a surprise eh, it seems that we do not have support for std::wstring on dingoo-linux…
For now, I have no idea how to solve this problem :([/quote]
I had the same problem when I was compiling for the PSP. The problem was that I was using newlib 1.16 which doesn’t have support for wchars. I updated this lib to 1.18 and everything worked all right. What libs does the dingoo use? You may need to recompile libstdc++ with wchar support.
actually libstdc++ is provided in Dingux toolchain and rootfs. I never had compiled this library before, I’m downloading the current svn version to see if I can build it successfully.
I’m not having much luck building libstdc++, so I tried a quick and dirty hack:
Now the compiler no longer complains about lack of wstring, but a new problem arose:
At worst, I’m thinking about disabling the support for utf8 on dingoo, but that would create a big mess in the code.
I wonder how it was resolved on the Wii port, has libogc wstring?
EDIT:
Ok guys, I finally managed to complete the dingoo build. To solve the wstringstream problem I just inserted another #define:
I don’t know what can happen at runtime when running a game with utf8 characters, but the testgame is working fine on my device.
It looks like the define _STLP_HAS_WCHAR_T has something to do with this.
Doing a quick search I found that support maybe available, but you would need to enable it through some options to autoconf (./configure). Have you tried it already?
Thanks again Zhek, I had found that too, but I’m having other problems in the build. While I can not solve it, I’ll try to disable support for utf8 on Dingoo.
Are the problems only in the Window_Message class?
Its possible to provide a Utf8-compatible version of Window_Message if you want, at least for dingoo (we even had such a version before but with wstring it was nicer to write because of non-variable glyph-byte-sizes).
Yes, as far as I could test.
I can’t use wstring, but It seems to me that the problem occurs in runtime when calling a wstringstream overloaded operator.
That would be great! We could use this version for Dingoo and/or others platforms future ports. Do you remember until which review it was active?
I added it in r1282. Please test if that works for you, Its tested (under Windows) with a Russian and a Japanese game.
Oh and their is some gigantic memleak in the picture code since maybe 100 revisions we still have to hunt down with valgrind. (= dont try games that use many pictures :D)
The best game for testing this is the “SAMPLE GAME” from Don Miguel (included in rpg2k maker). You have to overwrite the encoding to display the cyrillic values: Open RPG_RT.ini and add a section [EasyRpg]. In that section add “encoding=1251”. That forces cyrillic encoding. Good luck.