Config.yml with öäü

Discussion in 'Plugin Development' started by surtic, May 9, 2012.

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

    surtic

  2. Offline

    Sagacious_Zed Bukkit Docs

    It is probable that there is a bug with handling UTF-8 strings with the api.
     
  3. Offline

    surtic

    Hm okey, that sounds bad...
     
  4. Offline

    Njol

    Did you save the config as UTF-8?
     
  5. Offline

    surtic

    Bukkit creates the Config! In the Programm Code i set the Defaults and Save it with the Bukkit Methodes like this.

    Code:
    plugin = Statistik.getInstance();
    config = plugin.getConfig();
     
    config.addDefault("Ranks.3.Points", 200);     
    config.options().copyDefaults(true);
     
    plugin.saveConfig();
     
  6. Offline

    Njol

    But theres no ö, ä or ü in the defaults, thus the problem occurrs after you modify the config manually and add some umlauts, right?
     
  7. Offline

    surtic

    Yes in MyExample Config (defaults) is no äöü in a String. But a Admin wants to have it in the Rank Names. Of course we change the Config manually for add more Ranks.

    I had saved the Config after that in UTF-8 ore ISO-8895-1

    Sorry for dopple post

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 25, 2016
  8. Offline

    Njol

    What error do you get?
     
  9. Offline

    surtic

    Log
    Code:
    13:46:25 [SEVERE] Cannot load plugins/Statistik/config.yml
    org.bukkit.configuration.InvalidConfigurationException: unacceptable character '?' (0xFFFD) special characters are not allowed
    in "<string>", position 690
        at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:55)
        at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:143)
        at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:109)
        at org.bukkit.configuration.file.YamlConfiguration.loadConfiguration(YamlConfiguration.java:177)
        at org.bukkit.plugin.java.JavaPlugin.reloadConfig(JavaPlugin.java:117)
        at org.bukkit.plugin.java.JavaPlugin.getConfig(JavaPlugin.java:111)
        at de.secretcraft.statistik.manager.SettingsManager.<init>(SettingsManager.java:53)
        at de.secretcraft.statistik.Statistik.onEnable(Statistik.java:60)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:215)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:336)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:383)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:355)
        at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:337)
        at net.minecraft.server.MinecraftServer.t(MinecraftServer.java:420)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:407)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:224)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:475)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
    Caused by: unacceptable character '?' (0xFFFD) special characters are not allowed
    in "<string>", position 690
        at org.yaml.snakeyaml.reader.StreamReader.checkPrintable(StreamReader.java:70)
        at org.yaml.snakeyaml.reader.StreamReader.<init>(StreamReader.java:50)
        at org.yaml.snakeyaml.Yaml.load(Yaml.java:399)
        at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:53)
        ... 17 more
    
     
  10. Offline

    Njol

    Try to put the part which includes the umlaut into quotes, e.g. "blödes YAML"
     
  11. Offline

    surtic

    Yes i had the Strings in Quotes 'hellü' ore "hellö" on both i have the same error
     
  12. Offline

    Njol

    Are you sure that you save it as UTF-8? The only solution I found on the internet is to save it as UTF-8.
     
  13. Offline

    Sagacious_Zed Bukkit Docs

Thread Status:
Not open for further replies.

Share This Page