Warning: Unmappable character for encoding UTF8

Discussion in 'Plugin Development' started by Ineentho, May 7, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Ineentho

    Hello,

    When I build using ant (+Eclipse), I get this error:
    Code:
    warning: unmappable character for encoding UTF8
        [javac]         String prefix ="�a[1bF�6ull�bC�hest�a]�f";
    The real line:
    Code:
    String prefix ="§a[1bF§6ull§bC§hest§a]§f";
    Ant build file (open)

    Code:
    <project name="BurningHouse" default="dist" basedir=".">
        <property name="pluginname" value="FullChest"/>
        <property name="bukkit.jar" location="dist/Bukkit.jar"/>
        <property name="permissions.jar" location="dist/Permissions.jar"/>
        <property name="plugins" location="../../plugins/"/>
    
        <property name="src" location="src"/>
        <property name="bin" location="bin"/>
        <property name="dist" location="dist"/>
    
        <target name="init">
            <mkdir dir="${bin}"/>
        </target>
    
        <target name="compile" depends="init">
            <javac srcdir="${src}/fullChest" destdir="${bin}" includeantruntime="false">
                <classpath>
                    <pathelement location="${bukkit.jar}"/>
                    <pathelement location="${permissions.jar}"/>
                </classpath>
            </javac>
        </target>
    
        <target name="dist" depends="compile">
            <mkdir dir="${dist}"/>
            <jar jarfile="A:\Dropbox\Dropbox\Minecraft servers\testserver3\plugins\${pluginname}.jar">
                <fileset dir="${bin}"/>
                <fileset file="${src}/plugin.yml"/>
            </jar>
        </target>
    
        <target name="deploy" depends="dist">
            <copy file="${dist}/${pluginname}.jar" todir="${plugins}"/>
        </target>
    
        <target name="clean">
            <delete dir="${bin}"/>
            <delete dir="${dist}"/>
        </target>
    </project>


    When I later try to use a command of the plugin in-game, it looks like the § characters wasn't there at all. I think I managed to build without this error eariler, but I'm not sure.

    Thanks for any help!
     
  2. Offline

    matter123

    use /0007 i belive
     
  3. Offline

    Shamebot

    isn't it "\u00A7" ?
     
  4. Offline

    Ineentho

    So I have to use UTF-encodings (not sure if it's called that)? I just wrote § in the code, and it worked fine before. Isn't it any way to change the encodings or something?
     
  5. Offline

    rakiru

    I may be missing something here, but this package looks like it would be of use:
    org.bukkit.ChatColor
     
  6. Offline

    Ineentho

    I should maybe have said that I got this problem with other things too, like in comments. However, it's just a warning so I could just ignore it, and use the bukkit.ChatColor package.

    Thanks for the suggestions!
     
  7. Offline

    rakiru

    Ah, well I'm not sure how to help you there, but I'm glad that helped a bit.
     
Thread Status:
Not open for further replies.

Share This Page