Page 1 of 1

Tiled bug 0.7 WIP with unicode

Posted: 20 Mar 2008, 08:09
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

Re: Tiled bug 0.7 WIP with unicode

Posted: 01 Apr 2008, 07:42
by Bjørn
Thanks for reporting this issue. We will test this and try to fix it as soon as possible.

Re: Tiled bug 0.7 WIP with unicode

Posted: 01 Apr 2008, 21:48
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 ;) )

Re: Tiled bug 0.7 WIP with unicode

Posted: 02 Apr 2008, 15:07
by seeseekey
Can everyone compile me new fixed svn version and attach it on a post? That would be nice.

Regards seeseekey

Re: Tiled bug 0.7 WIP with unicode

Posted: 02 Apr 2008, 20:52
by ElvenProgrammer
biggeruniverse wrote: (yes, all you TMW old-timers, biggeruniverse is alive ;) )
bah :P

@seeseekey: here it is

Re: Tiled bug 0.7 WIP with unicode

Posted: 02 Apr 2008, 20:53
by biggeruniverse
EDIT: yes, it's good to see you too elven :P

Latest nightly has it:

http://www.biggeruniverse.com/projects/ ... 080401.jar

Re: Tiled bug 0.7 WIP with unicode

Posted: 03 Apr 2008, 07:21
by seeseekey
Thank you.

Re: Tiled bug 0.7 WIP with unicode

Posted: 04 Apr 2008, 18:29
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

Re: Tiled bug 0.7 WIP with unicode

Posted: 12 Apr 2008, 15:38
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:

Re: Tiled bug 0.7 WIP with unicode

Posted: 14 Apr 2008, 18:19
by seeseekey
Ahhh i understand^^ Then i must wait and use "ae" instead "ä" etc. Thank you. :)