Oracle Text In cards.txt Files
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
62 posts
• Page 3 of 5 • 1, 2, 3, 4, 5
Re: Oracle Text In cards.txt Files
by Chris H. » 26 Jun 2011, 19:21
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:
Note the change in the card's name. With this edit I went into the deck editor and this is what I see:
`

`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:
`
-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: Oracle Text In cards.txt Files
by Hellfish » 26 Jun 2011, 19:50
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.
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.

So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-
Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
UTF (was Re: Oracle Text In cards.txt Files)
by Braids » 26 Jun 2011, 19:54
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.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 ...
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.
Last edited by Braids on 26 Jun 2011, 20:03, edited 1 time in total.
"That is the dumbest thing I've ever seen." --Rob Cashwalker, regarding Innistrad double-sided cards. One of the first times he and I have ever agreed on something. 

-
Braids - Programmer
- Posts: 556
- Joined: 22 Jun 2011, 00:39
- Location: Unknown. Hobby: Driving myself and others to constructive madness.
- Has thanked: 1 time
- Been thanked: 1 time
Re: Oracle Text In cards.txt Files
by Braids » 26 Jun 2011, 19:57
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.Hellfish wrote:seeing as the characters are correct on the server
"That is the dumbest thing I've ever seen." --Rob Cashwalker, regarding Innistrad double-sided cards. One of the first times he and I have ever agreed on something. 

-
Braids - Programmer
- Posts: 556
- Joined: 22 Jun 2011, 00:39
- Location: Unknown. Hobby: Driving myself and others to constructive madness.
- Has thanked: 1 time
- Been thanked: 1 time
Re: UTF (was Re: Oracle Text In cards.txt Files)
by friarsol » 26 Jun 2011, 20:03
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.Braids wrote:to minimize all possible confusion, i suggest that we asciify everything. no single 'AE' characters. no accent marks over vowels.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Oracle Text In cards.txt Files
by Hellfish » 26 Jun 2011, 20:05
True, true. But the data obviously is there, and Forge, once it gets that data in the way its expected, doesn't scramble it.Braids wrote: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.Hellfish wrote:seeing as the characters are correct on the server
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.

So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-
Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: Oracle Text In cards.txt Files
by Chris H. » 26 Jun 2011, 20:05
`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.
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.
-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: Oracle Text In cards.txt Files
by friarsol » 26 Jun 2011, 20:19
The change to me looks like it takes the correct accented u and replaces it with an accented z.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.
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.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Oracle Text In cards.txt Files
by Chris H. » 26 Jun 2011, 20:21
`friarsol wrote:The change to me looks like it takes the correct accented u and replaces it with an accented z.

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.

-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: Oracle Text In cards.txt Files
by Hellfish » 26 Jun 2011, 20:39
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.
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.

So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-
Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: Oracle Text In cards.txt Files
by Braids » 26 Jun 2011, 20:39
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.htmlfriarsol wrote:The change to me looks like it takes the correct accented u and replaces it with an accented z.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.
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)
Last edited by Braids on 26 Jun 2011, 20:51, edited 1 time in total.
"That is the dumbest thing I've ever seen." --Rob Cashwalker, regarding Innistrad double-sided cards. One of the first times he and I have ever agreed on something. 

-
Braids - Programmer
- Posts: 556
- Joined: 22 Jun 2011, 00:39
- Location: Unknown. Hobby: Driving myself and others to constructive madness.
- Has thanked: 1 time
- Been thanked: 1 time
democracy
by Braids » 26 Jun 2011, 20:43
i only count 3 votes (for the short term decision) so far.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.
- ascii: Braids, friarsol
- utf-8: Hellfish
- abstain: Chris H., Jaedayr
Last edited by Braids on 26 Jun 2011, 20:54, edited 1 time in total.
"That is the dumbest thing I've ever seen." --Rob Cashwalker, regarding Innistrad double-sided cards. One of the first times he and I have ever agreed on something. 

-
Braids - Programmer
- Posts: 556
- Joined: 22 Jun 2011, 00:39
- Location: Unknown. Hobby: Driving myself and others to constructive madness.
- Has thanked: 1 time
- Been thanked: 1 time
Re: Oracle Text In cards.txt Files
by Jaedayr » 26 Jun 2011, 20:50
I am with Chris on this.
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
by Hellfish » 26 Jun 2011, 20:54
As it is now, you don't even have to search using those characters, you can still use "Aether Flash" and find it fine. 

So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-
Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: Oracle Text In cards.txt Files
by Braids » 26 Jun 2011, 21:25
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.Hellfish wrote:I added CardUtil.simplifyNameString(String) for this purpose, but it's not exactly UNICODE->ASCII conversion, just replacement operations.
"That is the dumbest thing I've ever seen." --Rob Cashwalker, regarding Innistrad double-sided cards. One of the first times he and I have ever agreed on something. 

-
Braids - Programmer
- Posts: 556
- Joined: 22 Jun 2011, 00:39
- Location: Unknown. Hobby: Driving myself and others to constructive madness.
- Has thanked: 1 time
- Been thanked: 1 time
62 posts
• Page 3 of 5 • 1, 2, 3, 4, 5
Who is online
Users browsing this forum: No registered users and 38 guests