Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Faces Standard Converters: ignore all Unicode leading and trailing space(s) #1953

Open
pizzi80 opened this issue Aug 8, 2024 · 0 comments
Open

Comments

@pizzi80
Copy link

pizzi80 commented Aug 8, 2024

use String.strip instead of String.trim to remove all Unicode spaces:

https://jkorpela.fi/chars/spaces.html

In general both method removes leading and trailing spaces from string. However the difference comes when we work with unicode charaters or multilingual features.

trim() removes all leading and trailing character whose ASCII value is less than or equal to 32 (‘U+0020’ or space).

According to Unicode standards there are various space characters having ASCII value more than 32(‘U+0020’). Ex: 8193(U+2001).

https://stackoverflow.com/questions/51266582/difference-between-string-trim-and-strip-methods-in-java-11

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

No branches or pull requests

1 participant