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, 17:07
Contact:

Tiled bug 0.7 WIP with unicode

Post by seeseekey »

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
Manasource
Manasource
Posts: 1438
Joined: 09 Dec 2004, 18:50
Location: North Rhine-Westphalia, Germany
Contact:

Re: Tiled bug 0.7 WIP with unicode

Post by Bjørn »

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, 04:33

Re: Tiled bug 0.7 WIP with unicode

Post by biggeruniverse »

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, 17:07
Contact:

Re: Tiled bug 0.7 WIP with unicode

Post by seeseekey »

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

Regards seeseekey
User avatar
ElvenProgrammer
Founder
Founder
Posts: 2526
Joined: 13 Apr 2004, 19:11
Location: Italy
Contact:

Re: Tiled bug 0.7 WIP with unicode

Post by ElvenProgrammer »

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

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

Re: Tiled bug 0.7 WIP with unicode

Post by biggeruniverse »

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, 17:07
Contact:

Re: Tiled bug 0.7 WIP with unicode

Post by seeseekey »

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

Re: Tiled bug 0.7 WIP with unicode

Post by seeseekey »

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, 04:33

Re: Tiled bug 0.7 WIP with unicode

Post by biggeruniverse »

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, 17:07
Contact:

Re: Tiled bug 0.7 WIP with unicode

Post by seeseekey »

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