EMULAB Forum

clrmamepro [English] => clrmame Discussion => Topic started by: ikuzihsoyiroy on 22 December 2019, 11:19

Title: characters
Post by: ikuzihsoyiroy on 22 December 2019, 11:19
hi
CMP in a simple dat transform '&' character in '&' and someone could not manage that dat

In another rom tool program '&' is wrong in that dat and conversion is needed to '&'.

How to solve this. I hope '&' would be only '&'

Thanks.
Title: Re: characters
Post by: Roman on 22 December 2019, 13:33
cmpro's dir2dat creates a fully valid xml datfile where some characters use their official html entity. So an ampersand & character is listed in the xml as &
cmpro reads the dats correctly and shows the names correctly, also scanning is done correctly.

if "someone" or "another romtool" can't manage that....well, then "someone" or "another romtool" does not parse XML correctly. If "someone" or "another romtool" should support it, go and ask them.
Title: Re: characters
Post by: ikuzihsoyiroy on 22 December 2019, 15:23
these are requests to me:

- there is '&' in unrenamed consoles nintendo nes (line 71111) and in taito type x3 (line 1050), I had to change them to & to load in RV

- not helping by asking gj abt it.. rv just follows xml specs, it should be fixed in the latest cmpro.. if not ask roman abt it

this is my 1st time about this querelle.

My 2 cents...
Title: Re: characters
Post by: Roman on 22 December 2019, 17:22
Again....

Note that the ampersand (&) and less-than (<) characters are not permitted in XML attribute values.
Cmpro uses the the xml/html entity references for such chars, e.g. by using: <rom name="this_is_an_&amp;_test" ......

If you got xml datfiles where & is only listed as &, then the datfile is not ok and should be fixed in the dat.

I don't see anything wrong from cmpro's point of view.
Title: Re: characters
Post by: ikuzihsoyiroy on 22 December 2019, 17:52

I understood. I'd correct/fix generated dat with '&' always.
Title: Re: characters
Post by: ArconEmu on 27 December 2019, 00:59
See also: https://stackoverflow.com/questions/1091945/what-characters-do-i-need-to-escape-in-xml-documents (https://stackoverflow.com/questions/1091945/what-characters-do-i-need-to-escape-in-xml-documents)