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

Does not work on Turkish (tr-TR) locales #86

Open
soundasleep opened this issue Jul 20, 2024 · 0 comments
Open

Does not work on Turkish (tr-TR) locales #86

soundasleep opened this issue Jul 20, 2024 · 0 comments

Comments

@soundasleep
Copy link
Contributor

It seems a lot of this project uses String.toLowerCase() instead of String.toLowerCase(Locale.ROOT), which causes issues on Turkish locales.

In tr-TR, title becomes tıtle, and (I think more importantly) Xdiv becomes Xdıv, which I think is breaking layout or parsing of elements.

For the same document, for my BoxRenderer, on an English locale I get the following elements sent through startElementContents:

  • Xdiv, html, body, label, Xspan, select, option, ...

However if I set -Duser.country=TR -Duser.language=tr I instead get the following:

  • Xdiv, html, body, Xdiv, label, ...

Clearly there's a different code path in the different locale, I suspect it has to do with toLowerCase() and/or toUpperCase() throughout either CssBox or jQueryStyle. For example in cz.vubtr.web.csskit.ElementMatcherSafeCI#matchesClass or org.fit.cssbox.css.HTMLNorm#attributesToStyles.

Related: radkovo/jStyleParser#29

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