EMULAB Forum

clrmamepro [English] => clrmame Discussion => Topic started by: Kamiya on 05 May 2010, 20:53

Title: clrmamepro & UTF-8
Post by: Kamiya on 05 May 2010, 20:53
Hello Roman, thanks a lot for your software, it's truly a POWERFUL tool for collectors !

But I think there's a "bug" somewhere (or maybe I'm too noob to find it), in the "changelog" for v3.132b it's mentioned that you added support for UTF-8.
Problem is when I use the "DIR2DAT" feature, every japanese-titled files/folders I have are not made mention of in the created dat.
EDIT: But when I use the scanner afterwards, the files/folders are "unnecessary".

Aren't kanjis/katas part of the UTF-8 supported characters ? If no, please could you allow them in future versions ?
Or maybe you added UTF-8 support, but not for DIR2DAT feature ? I'm kinda confused, sorry I'm not an expert in these kind of things.

Please help me on this one, I'm kinda lost I searched everywhere in the options and found strictly nothing  )=

Thanks again and keep up the good work Roman, we all appreciate it.


Yours,
Kamiya
Title: Re: clrmamepro & UTF-8
Post by: Roman on 06 May 2010, 07:14
utf8 support was added to the xml datfile parser only, i.e. when the xml file holds an encoding <?xml version="1.0" encoding="UTF-8"?> entry, then the names in the dat are correctly parsed.
Title: Re: clrmamepro & UTF-8
Post by: Kamiya on 06 May 2010, 10:36
Ah, which means if we scans a dat with a <?xml version="1.0" encoding="UTF-8"?> line, the japanese chars are gonna be parsed correctly.

So I guess at the moment we can't use the DIR2DAT feature for this matter, just the "Scanner" then, correct me if I'm wrong.
Are you going to implement the UTF-8 support for the DIR2DAT feature anytime in the future or it's not on your list ? :)

I would really appreciate to see this coming, it's really important for me. (The DIR2DAT & Scanner are the features I use the most in clrmamepro).


Thanks for your time

Yours,
Kamiya
Title: Re: clrmamepro & UTF-8
Post by: Roman on 06 May 2010, 10:52
well, I will check if I add an "utf8" encoding option to dir2dat...maybe one which you manually have to enable and then it gets right to the xml header....
...guess I have to convert the names as well then....as I said...I will do a little investigation on that...
Title: Re: clrmamepro & UTF-8
Post by: Kamiya on 06 May 2010, 13:37
Thanks a lot Roman, keep up the good work !

Yours,
Kamiya
Title: Re: clrmamepro & UTF-8
Post by: Roman on 06 May 2010, 18:25
I did a quick test with a dat with utf8 encoding in the xml and the set:
<?xml version="1.0 encoding="utf-8"?>....<game name="- [MGT] Sam Coupé Disc Drive Interface"> where é translates correctly to é when loading.

It was parsed successfully and a demo file with "é" was created. Using dir2dat or setinfo's export option exports a datfile which encodes the é as &#233; and loading this created dat shows correctly the é again...

...so...did I miss something here? Seems to work fine.....
Title: Re: clrmamepro & UTF-8
Post by: Roman on 07 May 2010, 09:21
hmm...ok..maybe I should try it with a real kanjis/katas containing xml....maybe you can provide me one?
Title: Re: clrmamepro & UTF-8
Post by: Kamiya on 07 May 2010, 11:27
Create a folder with japanese characters in it, which contains files named with japanese characters for example.
When you use DIR2DAT, neither the folder nor the file is accepted.
That's what I meant
Title: Re: clrmamepro & UTF-8
Post by: Roman on 07 May 2010, 14:41
then I only have to generate japanese filenames on my Win7........erm...ok...how to do that...

...ok...found a way...let's test a bit :O)
Title: Re: clrmamepro & UTF-8
Post by: Roman on 07 May 2010, 19:21
ok, the failures are based on the fact that kanjis/katas require some WideCharacter specific filesystem function calls to get the correct filename. The standard ones will convert them to "?" characters which are illegal....

Will check how much effort it is to change this throughout cmpro......I guess too much effort :)


Update: Yep...too much effort for the moment....sorry.