Page 1 of 1

[Solved] Ant Build Unmappable character

Posted: Sun Apr 26, 2009 11:04 pm
by RiZe
L2J Revision 2939
L2JDP Revision 5986
OS Windows Vista x64 SP1
Eclipse 3.3.2 M20080221-1800

I've rewriten some parts and add new features to my working copy and all strings are translated into my native language (Czech). Eclipse and project are configured to use UTF-8. PSPad show me UTF-8 when I open files and nothing is corrupted (It means characters, encoding etc) but when I try to build GameServer it fails with errors:

Code: Select all

 [javac] Compiling 1260 source files to D:\Programy\Eclipse Workspace\L2_GameServer\build\classes    [javac] D:\Programy\Eclipse Workspace\L2_GameServer\java\net\sf\l2j\gameserver\communitybbs\Manager\AdminBBSManager.java:225: unmappable character for encoding Cp1250    [javac]         htmlCode.append("<td FIXWIDTH=670>DiskusnĂ­ fĂłrum, kterĂ© chcete smazat vyberte ze seznamu nĂ­Ĺľe. ZároveĹ? vyberte, jestli chcete všechny subfĂłra a tĂ©mata odstranit, nebo pĹ™esunout.</td>");    [javac]                                                                                                                     ^    [javac] D:\Programy\Eclipse Workspace\L2_GameServer\java\net\sf\l2j\gameserver\communitybbs\Manager\TopBBSManager.java:520: unmappable character for encoding Cp1250    [javac]                     htmlCode.append("&nbsp;â?™&nbsp;<a action=\"bypass _bbstop;post;delete;" + forum.getId() + ";" + topic.getId() + ";" + post.getId() + "\">Odstranit</a>");    [javac]                                             ^    [javac] D:\Programy\Eclipse Workspace\L2_GameServer\java\net\sf\l2j\gameserver\communitybbs\Manager\TopBBSManager.java:524: unmappable character for encoding Cp1250    [javac]                     htmlCode.append("&nbsp;â?™&nbsp;<a action=\"bypass _bbstop;topic;edit;name;" + forum.getId() + ";" + topic.getId() + ";" + post.getId() + "\">ZmÄ›nit jmĂ©no</a>");    [javac]                                             ^    [javac] D:\Programy\Eclipse Workspace\L2_GameServer\java\net\sf\l2j\gameserver\communitybbs\Manager\TopBBSManager.java:525: unmappable character for encoding Cp1250    [javac]                     htmlCode.append("&nbsp;â?™&nbsp;<a action=\"bypass _bbstop;topic;edit;description;" + forum.getId() + ";" + topic.getId() + ";" + post.getId() + "\">ZmÄ›nit popis</a>");    [javac]                                             ^    [javac] D:\Programy\Eclipse Workspace\L2_GameServer\java\net\sf\l2j\gameserver\communitybbs\Manager\TopicBBSManager.java:178: unmappable character for encoding Cp1250    [javac]                 htmlCode.append("&nbsp;â?™&nbsp;<a action=\"bypass _bbsmemo;delete;" + topic.getId() + "\">Odstranit</a>");    [javac]                                         ^    [javac] D:\Programy\Eclipse Workspace\L2_GameServer\java\net\sf\l2j\gameserver\communitybbs\Manager\TopicBBSManager.java:179: unmappable character for encoding Cp1250    [javac]                 htmlCode.append("&nbsp;â?™&nbsp;<a action=\"bypass _bbsmemo;edit;name;" + topic.getId() + ";" + post.getId() + "\">ZmÄ›nit jmĂ©no</a>");    [javac]                                         ^    [javac] D:\Programy\Eclipse Workspace\L2_GameServer\java\net\sf\l2j\gameserver\communitybbs\Manager\TopicBBSManager.java:180: unmappable character for encoding Cp1250    [javac]                 htmlCode.append("&nbsp;â?™&nbsp;<a action=\"bypass _bbsmemo;edit;description;" + topic.getId() + ";" + post.getId() + "\">ZmÄ›nit popis</a>");    [javac]                                         ^    [javac] 7 errors 
In console output the strings are corrupted but in Run dialog I've set the Console encoding to UTF-8. What's wrong with it? What about the "Cp1250" which is my OS's default I think. Thanks for any advice and sorry for my English.

Re: [Compile Error] Ant Build Unmappable character

Posted: Sun Apr 26, 2009 11:20 pm
by janiii
in build.xml find the javac command and add the property

Code: Select all

encoding="iso-8859-2"
or whatever your desired encoding is.


or just use google and search for "ant javac encoding" ;)

Re: [Compile Error] Ant Build Unmappable character

Posted: Mon Apr 27, 2009 12:44 am
by MELERIX
and consider upgrade your eclipse version, current version is 3.4.2

Re: [Compile Error] Ant Build Unmappable character

Posted: Mon Apr 27, 2009 2:24 pm
by RiZe
janiii wrote:in build.xml find the javac command and add the property

Code: Select all

encoding="iso-8859-2"
or whatever your desired encoding is.


or just use google and search for "ant javac encoding" ;)
I've used but probably with wrong keywords but now it works. Thanks :)