DSH105 / HoloAPI

Add Holograms to your Bukkit server!
http://dev.bukkit.org/bukkit-plugins/holoapi/
GNU General Public License v3.0
31 stars 16 forks source link

Unicode Replaced by Question marks #88

Closed hockeymikey closed 10 years ago

hockeymikey commented 10 years ago

I create the Holograms with a unicode symbol (like ●). Everything appears fine but when I return later after the server has restarted all the unicode has been replaced with question marks (just one per symbol). The data.yml file is still encoded in utf-8 without BOM and changing the vaules in the data.yml and reloading the config on HoloAPI does not fix it either. Only manually editing the lines in game fixes them but they eventually are reverted back to question marks.

Only things I view in the logs from HoloAPI are the following. http://pastebin.com/6p7BMT6i Thanks

DSH105 commented 10 years ago

Use the in-built Unicode replacer in HoloAPI.

DSH105 commented 10 years ago

Here lies ye Unicode replacer :)

lol768 commented 10 years ago

hockeymikey commented 10 years ago

Unicode replacer fixes this issue on restarts. Not as clean as I would like it with the replacer but still gets the job done!

Favorlock commented 10 years ago

DSH105, you could probably do something along the lines of what I did in my CommonUtils plugin. It's not exactly the cleanest nor probably the best method but it works: https://github.com/Favorlock/CommonUtils/commit/f97f7a98b420513dd72cf76da4d201471dcfbe3b

Essentially what I do is look for unicode escapes in a string and convert it to a character.

DSH105 commented 10 years ago

Thanks @Favorlock. I'll implement it when I can get around to it (or you could PR :3).