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

utf-8 symbol problem with ellipsis #4219

Closed
khera opened this issue May 22, 2015 · 6 comments
Closed

utf-8 symbol problem with ellipsis #4219

khera opened this issue May 22, 2015 · 6 comments

Comments

@khera
Copy link

khera commented May 22, 2015

In bug #4079 the bullet symbol is converted back to its unicode escape, \u25CF. The build.xml fixes the bullet at line 656.

The same treatment should be given to the horizontal ellipsis, …, which should be converted back to \u2026 as it appears in the source.

The problem this causes is if the page serving the chart is not encoded utf-8, the ellipsis displays as "…" for example. When you convert the ellipsis back to \2026 in the generated highcharts.js, it works just fine with or without utf-8 encoding of the pages. This is discussed in http://forum.highcharts.com/highcharts-usage/data-label-truncation-bug-related-to-encoding-of-ellipsis-t32965/

Alternatively, if you build highcharts without the charset UTF-8 option to the Closure compiler, it will not convert the unicode escape sequences into utf-8 characters, and the fixups are not necessary. These are the only two characters that are non-ascii in the generated file from Closure. The YUI compressor does not convert the \u codes into utf-8 characters so the charset flag to it doesn't matter, but is unnecessary.

@khera
Copy link
Author

khera commented May 22, 2015

To be clear, this affects current versions of Firefox, Safari, and Chrome, not just legacy browsers like IE8, as mentioned in the referenced ticket.

@khera
Copy link
Author

khera commented May 22, 2015

Another note: the Closure compiler --charset option sets both input and output character sets, but the default input character set is already utf-8, so removing this option from the command line does indeed seem like the right solution, and will not affect any possible utf-8 in the source files.

You can verify this by running the following hello.js script thru the compiler with and without utf8 character set flag. It contains the utf-8 ellipsis.

function hello(name) {
    // Greets the user
    alert('Hello, … ' + name);
}
hello('New user');

@brunocoelho
Copy link

+1

@highslide-software, any plans to investigate it?

@gilcarmel
Copy link

+1

2 similar comments
@atungare
Copy link

+1

@Debga
Copy link

Debga commented Aug 10, 2015

+1

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

5 participants