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: 23 Aug 2007, 18:07
Contact:

Tiled bug 0.7 WIP with unicode

Post by seeseekey » 20 Mar 2008, 09:09

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: 09 Dec 2004, 19:50
Location: North Rhine-Westphalia, Germany
Contact:

Re: Tiled bug 0.7 WIP with unicode

Post by Bjørn » 01 Apr 2008, 08:42

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: 17 Sep 2005, 05:33

Re: Tiled bug 0.7 WIP with unicode

Post by biggeruniverse » 01 Apr 2008, 22:48

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: 23 Aug 2007, 18:07
Contact:

Re: Tiled bug 0.7 WIP with unicode

Post by seeseekey » 02 Apr 2008, 16:07

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: 13 Apr 2004, 20:11
Location: Italy
Contact:

Re: Tiled bug 0.7 WIP with unicode

Post by ElvenProgrammer » 02 Apr 2008, 21:52

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: 17 Sep 2005, 05:33

Re: Tiled bug 0.7 WIP with unicode

Post by biggeruniverse » 02 Apr 2008, 21:53

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: 23 Aug 2007, 18:07
Contact:

Re: Tiled bug 0.7 WIP with unicode

Post by seeseekey » 03 Apr 2008, 08:21

Thank you.
seeseekey
Peon
Peon
Posts: 21
Joined: 23 Aug 2007, 18:07
Contact:

Re: Tiled bug 0.7 WIP with unicode

Post by seeseekey » 04 Apr 2008, 19:29

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: 17 Sep 2005, 05:33

Re: Tiled bug 0.7 WIP with unicode

Post by biggeruniverse » 12 Apr 2008, 16:38

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: 23 Aug 2007, 18:07
Contact:

Re: Tiled bug 0.7 WIP with unicode

Post by seeseekey » 14 Apr 2008, 19:19

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