Skip to content

Conversation

abulujayn
Copy link

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

  • Most recent Paper version (1.21-40-master@b45d9b6)
  • CraftBukkit/Spigot/Paper 1.12.2
  • CraftBukkit 1.8.8

Demonstration:
image

Copy link
Member

@JRoy JRoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@abulujayn
Copy link
Author

abulujayn commented Jul 23, 2024

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?

@mdcfe
Copy link
Member

mdcfe commented Jul 23, 2024

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

@abulujayn
Copy link
Author

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 😂

@mdcfe mdcfe self-requested a review August 25, 2024 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The sethome not support áéíőúűáéóüö characters

3 participants