Essentials icon indicating copy to clipboard operation
Essentials copied to clipboard

Allow unicode characters as userdata file is now written in UTF-8

Open abulujayn opened this issue 1 year ago • 3 comments

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:
image

abulujayn avatar Jul 04 '24 02:07 abulujayn

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?

abulujayn avatar Jul 23 '24 22:07 abulujayn

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).

mdcfe avatar Jul 23 '24 22:07 mdcfe

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).

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 😂

abulujayn avatar Jul 23 '24 23:07 abulujayn