-
Notifications
You must be signed in to change notification settings - Fork 47.7k
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
International symbols in JSX #4267
Comments
Check what character encoding your serving your page with. It should likely be UTF-8 |
I think failing to support international characters is not by design :P. I just tested on jsfiddle and in one of the files in the examples directory, it seemed to work fine. This seems to imply to me that it's not a React issue. Are you sure you have the page encoding set correctly for your test? Try something like |
Yeahh. I've added meta and it works now. I assume on translation docs its better to add |
Yeah, that seems reasonable to me. Any example containing non-ascii characters should probably have the meta tag. On a related note: Might also want the meta tag on the english versions (for consistency, if nothing else). Encourage the best-practice of always specifying your encoding. But I'll let @spicyj and @zpao be the gatekeepers of that decision. |
@jimfb, agree on that. For consistency its better to add charset meta everywhere to resolve future confusions. |
I guess I'm okay with that, though in reality what charset you use for your HTML files is your own business and React doesn't really care. 99% of people probably do want utf-8 though so we can add it. |
cc @tako-black |
If we're going to make a suggestion about defining a charset, we should suggest the appropriate HTTP headers. The meta tag is buggy and has horrible perf characteristics. |
@bgw Users run into this when opening local html files, which don't have server headers. But yes, I agree. That said, anyone who knows how to set a server header will know to remove the meta tag from their markup :P. The point is to solve the problem where someone opens a local translated example and it blows up. |
@jimfb |
@tako-black Yep, if you want, any inline example in the translated documents that renders a full HTML markup (like the first code block example on http://facebook.github.io/react/docs/getting-started.html) should probably contain Was cc'ing you mostly so you had context and were aware of the issue, since it primarily affects translations. |
@jimfb |
I've experimented with international symbols inside react component and it failed on simple example. Is it by design behaviour?
And get
Despite that on JSFiddle it works like charm
I've tried this on OS X with sublime and webstorm. Both work like on image.
The text was updated successfully, but these errors were encountered: