Page 3 of 5

Re: Oracle Text In cards.txt Files

PostPosted: 26 Jun 2011, 19:21
by Chris H.
This is starting to get interesting. I edited the card txt fiel and replaced the two char equivalent with the correct character (I Hope :?: ) and the file now looks like this:

Name:Lim-Dûl's Cohort
ManaCost:1 B B
Types:Creature Zombie
Text:no text
PT:2/3
T:Mode$ Blocks | ValidCard$ Card.Self | ValidBlocked$ Creature | Execute$ TrigBlocks | TriggerDescription$ Whenever CARDNAME blocks or becomes blocked by a creature, that creature can't be regenerated this turn.
T:Mode$ AttackerBlocked | ValidCard$ Card.Self | ValidBlocker$ Creature | Execute$ TrigBlocked | Secondary$ True | TriggerDescription$ Whenever CARDNAME blocks or becomes blocked by a creature, that creature can't be regenerated this turn.
SVar:TrigBlocks:AB$Pump | Cost$ 0 | Defined$ TriggeredAttacker | KW$ HIDDEN CARDNAME can't be regenerated.
SVar:TrigBlocked:AB$Pump | Cost$ 0 | Defined$ TriggeredBlocker | KW$ HIDDEN CARDNAME can't be regenerated.
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/lim_duls_cohort.jpg
SetInfo:ICE|Common|http://magiccards.info/scans/en/ia/33.jpg
End
`
Note the change in the card's name. With this edit I went into the deck editor and this is what I see:

`

Re: Oracle Text In cards.txt Files

PostPosted: 26 Jun 2011, 19:50
by Hellfish
Sol:
Huh, I don't know what ErrorViewer has to do with anything, but I'll revert the changes made in r10066 since that was a dead end anyway.Lemme know if it works better afterwards.

Chris:
Well, Maze of Ith my dog. It almost seems like the svn client is the problem,seeing as the characters are correct on the server. Nice detective work,Chris. :D

UTF (was Re: Oracle Text In cards.txt Files)

PostPosted: 26 Jun 2011, 19:54
by Braids
Chris H. wrote:This is starting to get interesting. I edited the card txt fiel and replaced the two char equivalent with the correct character (I Hope :?: ) and the file now looks like this ...
what you were seeing before in the file was probably UTF-8, a means of encoding single unicode characters into multiple bytes (aka octets, 8-bit characters). your text editor probably changed the character into its ISO-8859-1 (aka ISO-Latin-1) equivalent, which would be one byte.

we need to decide what encoding(s) the .txt files are going to have for name and oracle text.

to minimize all possible confusion, i suggest that we asciify everything. no single 'AE' characters. no accent marks over vowels. the downsides?
  • one cannot use these characters when searching in the deck editor.
  • for those inclined to use accented characters, card lists might not sort in the order they expect.
  • for those inclined to use accented characters, the card names look just plain wrong. english-speakers may think of a u with a circumflex (^) to look like a u, but those who use other languages think of them to be completely different characters.
  • edit #1. this might make localization more difficult, if we plan to use non-English text for card names or oracle text.

Re: Oracle Text In cards.txt Files

PostPosted: 26 Jun 2011, 19:57
by Braids
Hellfish wrote:seeing as the characters are correct on the server
correctness is in the eye of the beholder. if your editor supported UTF-8, you would see the circumflexed u. if your editor supported ISO-8859-1 instead, you would see two apparently unrelated characters.

Re: UTF (was Re: Oracle Text In cards.txt Files)

PostPosted: 26 Jun 2011, 20:03
by friarsol
Braids wrote:to minimize all possible confusion, i suggest that we asciify everything. no single 'AE' characters. no accent marks over vowels.
I'm pretty sure this is what we were doing before; I don't recall a time ever seeing Unicode characters in the cards.txt files or accented vowels. It seems to be causing many unexpected issues trying to convert this over. Maybe it's best we set the cards.txt files back as they were, and if we want to try this in the future get all of the converting code in place before the cards make the conversion, so it's not such a bumpy ride for little gain.

Re: Oracle Text In cards.txt Files

PostPosted: 26 Jun 2011, 20:05
by Hellfish
Braids wrote:
Hellfish wrote:seeing as the characters are correct on the server
correctness is in the eye of the beholder. if your editor supported UTF-8, you would see the circumflexed u. if your editor supported ISO-8859-1 instead, you would see two apparently unrelated characters.
True, true. But the data obviously is there, and Forge, once it gets that data in the way its expected, doesn't scramble it.

My thought and whole reason for changing these things around in the first place was accuracy, since the cards, by all official sources, use Æ and not AE etc... Wether or not that's taking accuracy too far is, IMHO, a personal preference. :) My vote is on UTF-8, if nothing else than as a catch-most(if not catch-all).

Re: Oracle Text In cards.txt Files

PostPosted: 26 Jun 2011, 20:05
by Chris H.
Hellfish wrote:Chris:
Well, Maze of Ith my dog. It almost seems like the svn client is the problem,seeing as the characters are correct on the server. Nice detective work, Chris. :D
`
OK, I made and edit to the card name for Lim-Dûl's Cohort.

It is rev 10073. Can you guys see if this one card looks correct on your computers after syncing and updating with the SVN.

Re: Oracle Text In cards.txt Files

PostPosted: 26 Jun 2011, 20:19
by friarsol
Chris H. wrote:
Hellfish wrote:Chris:
Well, Maze of Ith my dog. It almost seems like the svn client is the problem,seeing as the characters are correct on the server. Nice detective work, Chris. :D
`
OK, I made and edit to the card name for Lim-Dûl's Cohort.

It is rev 10073. Can you guys see if this one card looks correct on your computers after syncing and updating with the SVN.
The change to me looks like it takes the correct accented u and replaces it with an accented z.

Re: Oracle Text In cards.txt Files

PostPosted: 26 Jun 2011, 20:21
by Chris H.
friarsol wrote:The change to me looks like it takes the correct accented u and replaces it with an accented z.
`
:mrgreen:

I think that I will take a back seat on this matter and work on a few quest decks and let others decide how to handle this issue. :wink:

Re: Oracle Text In cards.txt Files

PostPosted: 26 Jun 2011, 20:39
by Hellfish
I've reverted all the font shenanigans from r10066, so Forge should at least run now.

I'm fully ready to start reverting the other card name changes too, if it comes to that. This project is the closest to a democracy I've come upon in software development, so majority rules. :)

Re: Oracle Text In cards.txt Files

PostPosted: 26 Jun 2011, 20:39
by Braids
friarsol wrote:
Chris H. wrote:OK, I made and edit to the card name for Lim-Dûl's Cohort. It is rev 10073. Can you guys see if this one card looks correct on your computers after syncing and updating with the SVN.
The change to me looks like it takes the correct accented u and replaces it with an accented z.
here is why. examining the card in that rev, a hex editor shows the byte 0x9e is present where the "LATIN SMALL LETTER U WITH CIRCUMFLEX" belongs. this is neither UTF-8 nor ISO-Latin-1. it is Macintosh specific: http://kb.iu.edu/data/aeqb.html

edit 1: 0x9e isn't even defined by ISO-Latin-1. but in the Windows-1252 encoding, you get the accented Z. http://en.wikipedia.org/wiki/Windows-1252 (column E, row 9)

democracy

PostPosted: 26 Jun 2011, 20:43
by Braids
Hellfish wrote:I'm fully ready to start reverting the other card name changes too, if it comes to that. This project is the closest to a democracy I've come upon in software development, so majority rules. :)
i only count 3 votes (for the short term decision) so far.
  • ascii: Braids, friarsol
  • utf-8: Hellfish
  • abstain: Chris H., Jaedayr

Re: Oracle Text In cards.txt Files

PostPosted: 26 Jun 2011, 20:50
by Jaedayr
I am with Chris on this. :D Gonna avoid opponents that cause problems for now and update after a decision is implemented. I will probably never be searching using the characters but it does look nice to exactly duplicate the cards.

Re: Oracle Text In cards.txt Files

PostPosted: 26 Jun 2011, 20:54
by Hellfish
As it is now, you don't even have to search using those characters, you can still use "Aether Flash" and find it fine. :)

Re: Oracle Text In cards.txt Files

PostPosted: 26 Jun 2011, 21:25
by Braids
Hellfish wrote:I added CardUtil.simplifyNameString(String) for this purpose, but it's not exactly UNICODE->ASCII conversion, just replacement operations.
i see what you mean now. it only converts certain character sequences. actually, those weird characters should be taken care of by whatever java code is reading from the txt files. that is where the decoding to unicode takes place. i'm going to put a static method or two in there that operates on the entire card name.