Message with mysql will convert to ?????????
LadyCailinBot opened this issue · 5 comments
WORLDGUARD-3386 - Reported by Tony
reproduce step:
- Switch plugin storage to mysql.
- rg f global greeting 測試
- See it's behavior.
Here is result:
mysql will not correctly storage unicode string, it will display like "??"
I have tried following solution and all failed:
- Manually change table collation to "utf8_unicode_ci"
- Try following command:
rg f global greeting \u6E2C\u8A66
rg f global greeting '\u6E2C\u8A66'
rg f global greeting "\u6E2C\u8A66" - Manually change value to \u6E2C\u8A66, '\u6E2C\u8A66' and "\u6E2C\u8A66"
Some of those solution will temporarily work, but all failed when server restart.
version info:
[Server thread/INFO]: This server is running CraftBukkit version git-Spigot-c46583f-e6f9fd4 (MC: 1.8) (Implementing API version 1.8-R0.1-SNAPSHOT)
[Server thread/INFO]: [WorldGuard] Loading WorldGuard v6.0.0-beta-05.1569-
Comment by Tony
I found some case when manually change value to "\u6E2C\u8A66" will work for a long time.
I will try to find reason why some value like "\u6E2C\u8A66" were change to ?? when server restart.
Comment by sk89q
Does it also look like ?? in the database after WG saves the data?
Comment by Tony
if set with command "/rg f global greeting 測試", both ingame and database display ??
Comment by Tony
I found reason why value will change back to ?? again when I was changed value manually.
Here is reproduce step:
- /rg f global deny-message 測試
- /worldguard reload (because value in database is ??)
- Manually change value to 測試 in database.
- /worldguard reload (after this step, both ingame and database will display correct value)
- Change some flag like /rg f global build allow
- /worldguard reload
- Value in database was change to ?? again.
If you don't change any flag after manually change message value, it will display correct for a long time.