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

Edge renders bidi control characters (FSI/PDI) as mojibake #8

Closed
tsjensen opened this issue Jul 23, 2018 · 2 comments
Closed

Edge renders bidi control characters (FSI/PDI) as mojibake #8

tsjensen opened this issue Jul 23, 2018 · 2 comments

Comments

@tsjensen
Copy link
Owner

tsjensen commented Jul 23, 2018

On Microsoft Edge (Windows), bidi control characters (FSI/PDI) are rendered as mojibake. This is really ugly and impacts overall element sizing for CivBuddy:
edge-bug
This bug is only relevant for the Edge browser.

@tsjensen
Copy link
Owner Author

tsjensen commented Jul 23, 2018

This bug is actually an Edge bug, not a CivBuddy bug (bug id 6831905).
The FSI/PDI are (correctly) inserted by the fluent framework, who also have an issue about this (projectfluent/fluent.js#173).
CivBuddy does not use fluent.js directly, but rather as a transitive dependency from l20n.js, who also have an issue about this (l20n/l20n.js#178).

The fluent.js team appears to be under the impression that Microsoft has fixed the Edge bug, but on May 1, 2018, Microsoft changed their minds and decided against the fix, blaming some external entity.

So, the solution for now seems to be to disable bidi on a fluent.js level as described (incompletely) here, mostly by setting useIsolating: false in the fluent.js options. Unfortunately, l20n.js does not allow setting of fluent.js options.

@tsjensen tsjensen changed the title Edge renders bidi control characters (FSI/PDI) as mojibakes Edge renders bidi control characters (FSI/PDI) as mojibake Jul 25, 2018
@tsjensen
Copy link
Owner Author

tsjensen commented Jul 25, 2018

Implemented a workaround. We now patch l20n during build so that the useIsolating flag is cleared upon l20n initialization. This is OK for CivBuddy, as we support no RTL locales, and the Edge bug no longer triggers.
One day, l20n might be extended to pass fluent options along from the application. When that happens, we'll upgrade and get rid of our patch.

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