Allow unicode characters as userdata file is now written in UTF-8
Information
This PR fixes #1742.
Details
Proposed fix:
Allow unicode characters as userdata file is now encoded with UTF-8. (Remove safeString call)
Environments tested:
OS: Windows 11
Java version: Corretto-21.0.3.9.1
- [x] Most recent Paper version (1.21-40-master@b45d9b6)
- [ ] CraftBukkit/Spigot/Paper 1.12.2
- [ ] CraftBukkit 1.8.8
Demonstration:
The problem with this is that previously special chars were replaced with an underscore, if you remove this method call players may be confused if they use a special char and it suddenly not resolve to the correct warp.
Sorry, I don't understand what you mean. Before this change, using special characters would be replaced with underscores âpple -> _pple. Now it will no longer be replaced, where would the confusion occur? Wouldn't it cause less confusion?
This will break players trying to teleport to homes they saved prior to the change, as those will no longer be found when running an identical /home command after the change. This isn't necessarily a reason to reject this PR, but there needs to be some contingency so that players can find their old homes (and possibly re-create them).
This will break players trying to teleport to homes they saved prior to the change, as those will no longer be found when running an identical
/homecommand after the change. This isn't necessarily a reason to reject this PR, but there needs to be some contingency so that players can find their old homes (and possibly re-create them).
Am I misunderstanding? I thought the way it worked was: /sethome âpple would create a home named _pple. Players then had to use /home _pple to teleport to it. After this change, the home would still be called _pple and can be teleported to using /home _pple if created before the update. I don't see any conversion to "safe" string when fetching the home so I don't see the issue so either I'm blind or missing something, or both 😂