Solved Unicode with Yaml

Discussion in 'Spigot Plugin Development' started by FiXed, May 23, 2016.

  1. So I was trying to read unicode from the config.yml but it's not working or translating properly, is there a way around this? Should I create a new yml file and setup the options differently or how would I do that? I know there's a pretty simple answer but I just couldn't find this, note I've googled this for a while and still cannot find the answer.
     
  2. Try a .txt file?
     
  3. it's still pulling using .yml configuration, should I pull the messages handling it with my own way?
     
  4. Yes like a custom config for a txt file
     
  5. a custom config? What, you mean my own custom reading system for decoding the file?
     
  6. Maybe create with your ide and save the .yml with notepad++ as unicode ?
     
  7. nah, doesn't work. Just used escape codes.
     
  8. You have to remember that u icode is locale specific. This means each Unicode character looks differently depending on your charset encoding. What I believe you want (like most people want)is for utf8 Unicode symbols to work. This can be achieved by setting up your locale correctly on the server. There are a number of ways to do this, but it is platform dependent, so I won't go into specifics here. The Minecraft server runs with whatever locale the JVM is setup to use, and by default JVM uses the system's locale. You can alternatively override this using a JVM flag, but the correct option is to setup your system locale.