Tiled bug 0.7 WIP with unicode

Ask for help regarding any technical issue or report any bug or OS independent issues.
Post Reply
seeseekey
Peon
Peon
Posts: 21
Joined: Thu Aug 23, 2007 6:07 pm
Contact:

Tiled bug 0.7 WIP with unicode

Post by seeseekey » Thu Mar 20, 2008 9:09 am

I had a problem with tiled 0.7 WIP and unicode. I create a map with a NPC with following code:

Code: Select all

<object name="Jack" type="NPC" x="5840" y="4912" width="32" height="32">
   <properties>
    <property name="SCRIPT">
     function npc_handler(npc, ch)
       do_message(npc, ch, "Willkommen in Selphi Timlet, der Stadt in der Wueste.")
     end
    </property>
    <property name="NPC_ID">
     125
    </property>
   </properties>
  </object>
When i change it to the following code (in Tiled):

Code: Select all

  <object name="Jack" type="NPC" x="5840" y="4912" width="32" height="32">
   <properties>
    <property name="SCRIPT">
     function npc_handler(npc, ch)        do_message(npc, ch, "Willkommen in Selphi Timlet, der Stadt in der Wüste.")      end
    </property>
    <property name="NPC_ID">
     125
    </property>
   </properties>
  </object>
and save the map an reopen it, Tiled says: Error while loading map: Invalid byte 1 of 1-byte UTF-8 sequence. The result is that i not can use charactes like "ä", "ö" and "ü". I mean its a bug, or?

Regards seeseekey
User avatar
Bjørn
TMW Adviser
TMW Adviser
Posts: 1430
Joined: Thu Dec 09, 2004 7:50 pm
Location: North Rhine-Westphalia, Germany
Contact:

Re: Tiled bug 0.7 WIP with unicode

Post by Bjørn » Tue Apr 01, 2008 8:42 am

Thanks for reporting this issue. We will test this and try to fix it as soon as possible.
User avatar
biggeruniverse
Peon
Peon
Posts: 42
Joined: Sat Sep 17, 2005 5:33 am

Re: Tiled bug 0.7 WIP with unicode

Post by biggeruniverse » Tue Apr 01, 2008 10:48 pm

It's actually the base Java XML parser being a very picky beastie. Latest revision (735) from HEAD has a fix in place. Thanks for pointing it out, seeseekey.

-bu
(yes, all you TMW old-timers, biggeruniverse is alive ;) )
We are on the outer reaches of someone else's universe
seeseekey
Peon
Peon
Posts: 21
Joined: Thu Aug 23, 2007 6:07 pm
Contact:

Re: Tiled bug 0.7 WIP with unicode

Post by seeseekey » Wed Apr 02, 2008 4:07 pm

Can everyone compile me new fixed svn version and attach it on a post? That would be nice.

Regards seeseekey
User avatar
ElvenProgrammer
TMW Adviser
TMW Adviser
Posts: 2526
Joined: Tue Apr 13, 2004 8:11 pm
Location: Italy
Contact:

Re: Tiled bug 0.7 WIP with unicode

Post by ElvenProgrammer » Wed Apr 02, 2008 9:52 pm

biggeruniverse wrote: (yes, all you TMW old-timers, biggeruniverse is alive ;) )
bah :P

@seeseekey: here it is
Attachments
tiled.zip
(339.88 KiB) Downloaded 39 times
User avatar
biggeruniverse
Peon
Peon
Posts: 42
Joined: Sat Sep 17, 2005 5:33 am

Re: Tiled bug 0.7 WIP with unicode

Post by biggeruniverse » Wed Apr 02, 2008 9:53 pm

EDIT: yes, it's good to see you too elven :P

Latest nightly has it:

http://www.biggeruniverse.com/projects/ ... 080401.jar
We are on the outer reaches of someone else's universe
seeseekey
Peon
Peon
Posts: 21
Joined: Thu Aug 23, 2007 6:07 pm
Contact:

Re: Tiled bug 0.7 WIP with unicode

Post by seeseekey » Thu Apr 03, 2008 8:21 am

Thank you.
seeseekey
Peon
Peon
Posts: 21
Joined: Thu Aug 23, 2007 6:07 pm
Contact:

Re: Tiled bug 0.7 WIP with unicode

Post by seeseekey » Fri Apr 04, 2008 7:29 pm

I had tested it and i found a little bug. When i load the map make a NPC:

Code: Select all

  <object name="Jack" type="NPC" x="5856" y="4927" width="32" height="32">
   <properties>
    <property name="SCRIPT">
     function npc_handler(npc, ch)        do_message(npc, ch, "Willkommen in Selphi Timlet, der Stadt in der Wüste.")      end
    </property>
    <property name="NPC_ID">
     125
    </property>
   </properties>
  </object>
and i save it with Tiled in the file stands:

Code: Select all

  <object name="Jack" type="NPC" x="5856" y="4927" width="32" height="32">
   <properties>
    <property name="SCRIPT">
     function npc_handler(npc, ch)        do_message(npc, ch, "Willkommen in Selphi Timlet, der Stadt in der Wüste.")      end
    </property>
    <property name="NPC_ID">
     125
    </property>
   </properties>
  </object>
When i reopen it on Tiled (and save again) in the file stands the follow:

Code: Select all

  <object name="Jack" type="NPC" x="5856" y="4927" width="32" height="32">
   <properties>
    <property name="SCRIPT">
     function npc_handler(npc, ch)        do_message(npc, ch, "Willkommen in Selphi Timlet, der Stadt in der W?ste.")      end
    </property>
    <property name="NPC_ID">
     125
    </property>
   </properties>
  </object>
Is there a parse error while Tiled load the map?

Regards seeseekey
User avatar
biggeruniverse
Peon
Peon
Posts: 42
Joined: Sat Sep 17, 2005 5:33 am

Re: Tiled bug 0.7 WIP with unicode

Post by biggeruniverse » Sat Apr 12, 2008 4:38 pm

It's not really a parse error, it's how Java handles Unicode (which is silly). Hopefully for release we'll have a real solution, not just patchwork. :wink:
We are on the outer reaches of someone else's universe
seeseekey
Peon
Peon
Posts: 21
Joined: Thu Aug 23, 2007 6:07 pm
Contact:

Re: Tiled bug 0.7 WIP with unicode

Post by seeseekey » Mon Apr 14, 2008 7:19 pm

Ahhh i understand^^ Then i must wait and use "ae" instead "ä" etc. Thank you. :)
Post Reply