Page 2 of 5

Re: Oracle Text In cards.txt Files

PostPosted: 25 Jun 2011, 18:02
by Chris H.
Using the default LAF for MacOS: "gui.laf=com.apple.laf.AquaLookAndFeel"

I get the same result with "Use LAF Fonts" on or off.

Using Apple Mac OS X Snow Leopard v10.6.8

`

Re: Oracle Text In cards.txt Files

PostPosted: 25 Jun 2011, 18:09
by Hellfish
Yeah, I know why it's happening. The font used is not a UNICODE font and tries to represent the single two-byte character û as two separate ASCII one-byte characters.I'm poking around,trying out different solutions right now. EDIT: It worked for me because I'm on a different ASCII codepage, which happens to contain those characters.

Common methods? (Re: naming convention of cards.txt files)

PostPosted: 25 Jun 2011, 18:34
by Braids
Braids wrote:name field inside txt file = Oracle name, converted from Unicode to imperfect ASCII ('AE' to two characters, removal of accent marks from vowels)
and
name of txt file itself = name field, all punctuation removed, spaces replaced with underscores, and converted to all lower-case + ".txt"
i'm glad I posted here, it seems that my mention of unicode helped with the oracle text, even though it was ever so slightly off topic.

are there common methods to perform either of these conversions? if so, where? if not, i can take a crack at 'em.

Re: Oracle Text In cards.txt Files

PostPosted: 25 Jun 2011, 18:54
by Hellfish
I added CardUtil.simplifyNameString(String) for this purpose, but it's not exactly UNICODE->ASCII conversion, just replacement operations.

Re: Oracle Text In cards.txt Files

PostPosted: 25 Jun 2011, 19:23
by Braids
Hellfish wrote:I added CardUtil.simplifyNameString(String) for this purpose, but it's not exactly UNICODE->ASCII conversion, just replacement operations.
we wouldn't want exact unicode to ascii conversion, because that would prohibit asymmetric replacements. for example, when replacing accented vowels with non accented versions, one cannot convert it back to the original unicode because the information about the accent mark has been lost.

Re: Oracle Text In cards.txt Files

PostPosted: 26 Jun 2011, 13:23
by Hellfish
Chris & Sol, could you try something for me, just to rule something out?
Get r10066 or later and go into res/gui/gui.properties and change CardPanel/font, CardDetailPanel/font and DeckEditor/CardTable/font to Arial instead of Dialog.See if that helps.

Re: Oracle Text In cards.txt Files

PostPosted: 26 Jun 2011, 13:30
by Chris H.
Hellfish wrote:Chris & Sol, could you try something for me, just to rule something out?
Get r10066 or later and go into res/gui/gui.properties and change CardPanel/font, CardDetailPanel/font and DeckEditor/CardTable/font to Arial instead of Dialog.See if that helps.
`
I will try to check this out in a few hours, my wife wants me to go out with her for a few hours. :mrgreen:

Re: Oracle Text In cards.txt Files

PostPosted: 26 Jun 2011, 16:00
by slapshot5
Hellfish wrote:Chris & Sol, could you try something for me, just to rule something out?
Get r10066 or later and go into res/gui/gui.properties and change CardPanel/font, CardDetailPanel/font and DeckEditor/CardTable/font to Arial instead of Dialog.See if that helps.
I have the same setup as Chris basically, and thus, the same problem. I changed those 3 things to Arial. The problem still exists as described.

-slapshot5

Re: Oracle Text In cards.txt Files

PostPosted: 26 Jun 2011, 17:15
by friarsol
Hellfish wrote:Chris & Sol, could you try something for me, just to rule something out?
Get r10066 or later and go into res/gui/gui.properties and change CardPanel/font, CardDetailPanel/font and DeckEditor/CardTable/font to Arial instead of Dialog.See if that helps.
Just tried this and I got stuck in an Infinite Loop of Errors.

Code: Select all
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at java.awt.EventDispatchThread.handleException(Unknown Source)
   at java.awt.EventDispatchThread.processException(Unknown Source)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.Dialog$1.run(Unknown Source)
   at java.awt.Dialog$3.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.awt.Dialog.show(Unknown Source)
   at java.awt.Component.show(Unknown Source)
   at java.awt.Component.setVisible(Unknown Source)
   at java.awt.Window.setVisible(Unknown Source)
   at java.awt.Dialog.setVisible(Unknown Source)
   at forge.error.ErrorViewer.showDialog(ErrorViewer.java:140)
   at forge.error.ErrorViewer.showError(ErrorViewer.java:76)
   at forge.error.ErrorViewer.showError(ErrorViewer.java:48)
   at forge.error.ExceptionHandler.handle(ExceptionHandler.java:48)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

Re: Oracle Text In cards.txt Files

PostPosted: 26 Jun 2011, 17:29
by Hellfish
The Security error was accidental, and was fixed r10067. (Java is surprisingly sensitive about certain imports..)

I'm scrounging for time tonight, but I'm on this every second I can.

Re: Oracle Text In cards.txt Files

PostPosted: 26 Jun 2011, 18:07
by friarsol
Hellfish wrote:The Security error was accidental, and was fixed r10067. (Java is surprisingly sensitive about certain imports..)
I'm not sure why I was getting that, maybe Eclipse hadn't refreshed. Changing the font doesn't seem to help though. It might have been the display Option. I was on Napkin and it was just giving me the same thing.

Re: Oracle Text In cards.txt Files

PostPosted: 26 Jun 2011, 18:23
by Hellfish
Wait, you're still getting the same error, after r10067?

Re: Oracle Text In cards.txt Files

PostPosted: 26 Jun 2011, 18:23
by Hellfish
Wait, you're still getting the same error, after r10067?

Re: Oracle Text In cards.txt Files

PostPosted: 26 Jun 2011, 18:49
by friarsol
Hellfish wrote:Wait, you're still getting the same error, after r10067?
Yep I was never on r10067, I didn't get home till after it was up to 71, and sync'd straight to that and then tried it.

Re: Oracle Text In cards.txt Files

PostPosted: 26 Jun 2011, 19:14
by Chris H.
Chris H. wrote:I will try to check this out in a few hours, my wife wants me to go out with her for a few hours. :mrgreen:
`
Like Slapshot said we have very similar system setups. I am currently using rev 10070 and a new test. My gui.properties file was edited and now looks like this:

Display--file=display_layout.xml
Display/new--file=display_new_layout.xml
DeckEditor--file=deck_editor_layout.xml
CardPanel/font=Arial
CardDetailPanel/font=Arial
DeckEditor/CardTable/font=Arial
`
and I am still getting the incorrect two character interpretation for the accented character for the Lim Dul creatures. I opened one of these creature's modified card txt files 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