MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

Pages: 1

CiroConsentino
Frontend freak!
Reged: 09/21/03
Posts: 6211
Loc: Alien from Terra Prime... and Brazil
Send PM


Does MAME support unicode ?
#327527 - 06/28/14 02:06 PM


I wonder if the official MAME or any other MAME derivate support unicode strings. Thank you.
What game would have unicode texts ?



Emu Loader
Ciro Alfredo Consentino
home: http://emuloader.mameworld.info
e-mail: [email protected]



Heihachi_73
I am the Table!
Reged: 10/29/03
Posts: 1074
Loc: Melbourne, Australia
Send PM


Re: Does MAME support unicode ? new [Re: CiroConsentino]
#327547 - 06/28/14 10:03 PM


> I wonder if the official MAME or any other MAME derivate support unicode strings.
> Thank you.
> What game would have unicode texts ?

No games have/require Unicode text AFAIK (at least in the UI itself) - e.g. Japanese games are translated/romanized using the Latin alphabet, such as Daimakaimura (Japan) instead of being written in Japanese, or having the name Ghouls 'n Ghosts (which the Japanese version was never called).

I'm sure the font rendering engine can handle it, but I think the Windows command prompt would fail that task, especially on an older 32-bit OS, where Windows can use Terminal instead of Lucida Console (the latter does support Unicode).



Traso
MAME Fan
Reged: 01/15/13
Posts: 2687
Send PM


google say new [Re: Heihachi_73]
#327592 - 06/30/14 01:39 AM


https://www.google.com/?gws_rd=ssl#q=mame+unicode


http://mamedev.org/source/src/lib/util/unicode.h.html


Viewing File: /src/lib/util/unicode.h
1 /*********************************************************************
2
3 unicode.h
4
5 Unicode related functions
6
7 This code is for converting between UTF-8, UTF-16, and 32-bit
8 Unicode strings. These functions roughly parallel C runtime
9 library functions like mbtowc() and similar functions, but are
10 specific for these Unicode encodings. Specifically, there are
11 functions that convert UTF-8 and UTF-16 char clusters to and from
12 singular 32-bit Unicode chars.



Scifi frauds. SF illuminates.
_________________

Culture General Contact Unit (Eccentric)



CiroConsentino
Frontend freak!
Reged: 09/21/03
Posts: 6211
Loc: Alien from Terra Prime... and Brazil
Send PM


Re: google say new [Re: Traso]
#327595 - 06/30/14 02:26 AM


Thank you. I know about the unicode + mame google search.
I was wondering if any game in MAME or UME use a game title/manufacturer with unicode format.
afaik, the -listxml output is XML language in a plain text file with some html format tags.



Emu Loader
Ciro Alfredo Consentino
home: http://emuloader.mameworld.info
e-mail: [email protected]



Roman
Regular
Reged: 09/21/03
Posts: 1584
Send PM


Re: google say new [Re: CiroConsentino]
#327606 - 06/30/14 06:38 AM


xml's default encoding is utf-8 so you should interpret it as utf-8 unless a different encoding is specified in its xml element


....and if I remember correctly MAME' listxml output had one or two utf-8 chars in the past which might have been replaced meanwhile...could be a German Umlaut or something...

and don't forget to differ between an utf8/16 text file and its font-representation in editors.....common mistake of thinking something is wrong....:-)



CiroConsentino
Frontend freak!
Reged: 09/21/03
Posts: 6211
Loc: Alien from Terra Prime... and Brazil
Send PM


Re: google say new [Re: Roman]
#327612 - 06/30/14 01:24 PM


Thank you for the reply. From my internet research, shouldn't the xml file have something like this to mark it as unicode ?
Code:

< ?xml version="1.0" encoding="UTF-8"? >


MAME's -listxml output have only has the version tag. No encoding tag.

My frontend Emu Loader read this file as ANSI format, and I haven't notice any parsing errors (Delphi 7 compiler doesn't support unicode). I really need to upgrade to Delphi XE6 for full unicode support...

Edited by CiroConsentino (06/30/14 01:37 PM)



Emu Loader
Ciro Alfredo Consentino
home: http://emuloader.mameworld.info
e-mail: [email protected]



Roman
Regular
Reged: 09/21/03
Posts: 1584
Send PM


Re: google say new [Re: CiroConsentino]
#327614 - 06/30/14 03:09 PM


if no encoding attribute is given it is utf-8 by default. to avoid confusion people should add the attribute though.



CiroConsentino
Frontend freak!
Reged: 09/21/03
Posts: 6211
Loc: Alien from Terra Prime... and Brazil
Send PM


Re: google say new [Re: Roman]
#327615 - 06/30/14 03:55 PM


This is good to know. Thanks again for the help.



Emu Loader
Ciro Alfredo Consentino
home: http://emuloader.mameworld.info
e-mail: [email protected]



R. Belmont
Cuckoo for IGAvania
Reged: 09/21/03
Posts: 9716
Loc: ECV-197 The Orville
Send PM


Re: google say new [Re: CiroConsentino]
#327617 - 06/30/14 05:00 PM


> This is good to know. Thanks again for the help.

MESS softlists definitely contain Japanese UTF-8 characters (e.g. x1_flop.xml), and I believe there's some Cyrillic and other non-Roman European stuff scattered around (umlauts, the German "sharp S" that looks like the Greek Beta, that sort of thing). If MAME doesn't already have this stuff it likely will in the future.

Edited by R. Belmont (06/30/14 05:01 PM)



Pi
Allergic to life
Reged: 09/20/03
Posts: 6449
Loc: Room 101
Send PM


Re: google say new [Re: CiroConsentino]
#327621 - 06/30/14 06:40 PM


> Delphi 7 compiler doesn't support unicode

Have you tried Free Pascal Compiler + Lazarus?

http://www.lazarus.freepascal.org/

I started using components that are used now in Lazarus way way back when I used Delphi 6 & 7 and they were already great. Now it's a pretty mature project, and aside some missing ultra-technical implementations that you'll probably not miss, it's a really complete compiler for most Pascal and Object Pascal dialects. It compiles code I wrote in 1997.



Wound up, can't sleep, can't do anything right, little honey / Oh, since I set my eyes on you. / I tell you the truth.
I can't get it right / Get it right / Since I met you...



CiroConsentino
Frontend freak!
Reged: 09/21/03
Posts: 6211
Loc: Alien from Terra Prime... and Brazil
Send PM


Re: google say new [Re: Pi]
#327622 - 06/30/14 08:13 PM


Yes, I checked Lazarus a while ago. Didn't like it much. Besides EL and EmuCon are very large projects. The main component EasyListView doesn't work with Lazarus, and ELV's author is not updating the project anymore, sadly.



Emu Loader
Ciro Alfredo Consentino
home: http://emuloader.mameworld.info
e-mail: [email protected]



CiroConsentino
Frontend freak!
Reged: 09/21/03
Posts: 6211
Loc: Alien from Terra Prime... and Brazil
Send PM


Re: google say new [Re: R. Belmont]
#327624 - 06/30/14 09:18 PM


One more reason to start looking into Delphi XE6



Emu Loader
Ciro Alfredo Consentino
home: http://emuloader.mameworld.info
e-mail: [email protected]



CiroConsentino
Frontend freak!
Reged: 09/21/03
Posts: 6211
Loc: Alien from Terra Prime... and Brazil
Send PM


I managed to display unicode with Delphi 7! new [Re: R. Belmont]
#329065 - 08/01/14 08:14 PM


I found a UTF8Decode() function that works with MAME/MESS software lists. NeoCD show alt games correctly.
I wonder what is the format of the alt_title entries in software lists ? neocd.xml for example.
Code:

	< software name="zintrick" >
< description >Oshidashi Zintrick (Jpn)< /description >
< year >1996< /year >
< publisher >ADK
< info name="alt_title" value="押し出しジントリック" / >



more info:
http://www.mameworld.info/ubbthreads/sho...p;vc=1&new=



Roman
Regular
Reged: 09/21/03
Posts: 1584
Send PM


Re: I managed to display unicode with Delphi 7! new [Re: CiroConsentino]
#329067 - 08/01/14 08:43 PM


as said it should be utf8 unless someone messed up the encoding when committing. the visual representation depends on the font of course.
.... usually it helps looking at it with eg notepad++



R. Belmont
Cuckoo for IGAvania
Reged: 09/21/03
Posts: 9716
Loc: ECV-197 The Orville
Send PM


Re: I managed to display unicode with Delphi 7! new [Re: CiroConsentino]
#329068 - 08/01/14 09:46 PM


Softlists are UTF-8. You can view them correctly through the GIT mirror:

http://git.redump.net/mame/tree/hash/neocd.xml

...will show the proper Japanese characters so you can check your work.



CiroConsentino
Frontend freak!
Reged: 09/21/03
Posts: 6211
Loc: Alien from Terra Prime... and Brazil
Send PM


Re: I managed to display unicode with Delphi 7! new [Re: R. Belmont]
#329069 - 08/01/14 09:51 PM


Thank you for the link. TStringList in Delphi 7 only handle ansi strings.
My frontend is now showing them correctly in the list



R. Belmont
Cuckoo for IGAvania
Reged: 09/21/03
Posts: 9716
Loc: ECV-197 The Orville
Send PM


Re: I managed to display unicode with Delphi 7! new [Re: CiroConsentino]
#329071 - 08/01/14 10:03 PM


> Thank you for the link. TStringList in Delphi 7 only handle ansi strings.
> My frontend is now showing them correctly in the list

Great!



CiroConsentino
Frontend freak!
Reged: 09/21/03
Posts: 6211
Loc: Alien from Terra Prime... and Brazil
Send PM


Holy Moly :) new [Re: R. Belmont]
#329089 - 08/02/14 03:27 AM


Almost done...
http://www.mameworld.info/ubbthreads/userfiles/329087-unicode-encode-decode-working.png

Too bad TLabel and RichEdit controls do not support WideString.


Pages: 1

MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

Extra information Permissions
Moderator:  Robbbert, Tafoid 
0 registered and 327 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 2785