Bmimport players from banned-players.json causing encode issue
prozhong opened this issue · 8 comments
I used Banmanager v5.6.0 and its my first time installing this
My server runs on win2008 and the banned-players.json is utf8 witout BOM encode.
After I used "bmimport players",
it showed
[03:46:47] [Craft Scheduler Thread - 5/INFO]: �[0;32;1mPlayer ban import started�[m
[03:46:47] [Craft Scheduler Thread - 5/INFO]: [BanManager] §aPlayer ban import started
[03:46:47] [Craft Scheduler Thread - 5/INFO]: [BanManager] §aPlayer ban import finished
[03:46:47] [Craft Scheduler Thread - 5/INFO]: �[0;32;1mPlayer ban import finished�[m
I thought its okay but i find the player name and ban reason were wrong encoded in my remote Mysql database's table
The sql table used utf8 and the "banned-players.json"is utf8 encoded too...
If I use "/ban Jack причина_이유_理由", the database will record it correctly where reason is 'причина_이유_理由', without encode error.
But "/Bmimport" causes "причина_이유_理由" recorded as a total mess
Can you provide an example banned-players.json which is having the problems please, for me to test with?
http://pastebin.com/mEeshDV3
here it is...Using utf8 no BOM
Forgot to say, in this version I met error when do "/unban"
when unban a player
(Banmanager v5.6.0)
[03:50:43] [Craft Scheduler Thread - 7/WARN]: org.apache.commons.lang.UnhandledException: Plugin BanManager v5.6.0 generated an exception while executing task 104
at org.bukkit.craftbukkit.v1_8_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:56)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at me.confuser.banmanager.commands.UnbanCommand$1.run(UnbanCommand.java:88)
at org.bukkit.craftbukkit.v1_8_R2.scheduler.CraftTask.run(CraftTask.java:71)
at org.bukkit.craftbukkit.v1_8_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
... 3 more
(UnbanCommand.java:88)
if (!actor.getUUID().equals(ban.getActor().getUUID()) && !sender.hasPermission("bm.exempt.override.ban")
I did "/unban" from console and the error went out
@confuser
I tried it, the new dev-168 works well without encoding error
👍
Apologies for the delay. Your example paste appears to have been removed. I haven't been able to test, but I've pushed a commit with a possible fix. You can download a developer build at http://ci.frostcast.net/job/BanManager/168/