-
Notifications
You must be signed in to change notification settings - Fork 29.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
Samples not language aware #29739
Comments
It depends on your editor and its settings. If the file is saved as UTF-8, you shouldn't have such problems. But I agree, this is too much. |
my file saved as UTF-8 |
Wrap your sample code above in code blocks so that it's properly formatted. I cannot try unformatted code. |
|
What happens if you use |
not work |
Maybe there's something else wrong, then. Let's wait for others to chime in. |
i recheck 'content-type': 'text/html; charset=utf-8' work as expected :) typo :) was utf8 so i guess sample at page https://nodejs.org/dist/latest-v12.x/docs/api/http2.html under title "Server-side example" should be changed at line with code and sample become international friendly :) |
google search 'content-type': 'text/html' site:nodejs.org should return zero :) |
i tried search utf8 at site nodejs.org - it return many - maybe it not ok? |
The thing is that the translators shouldn't have translated this in the first place, and secondly this should have been caught up in review. But anyway mistakes happen so we are here to fix them, including yourself :) I'm not sure what's the best solution. The easiest one would be to fix this specific snippet, but for the long term we probably need to standardize this. /CC @Trott |
@nodejs/i18n Opinions on how best to address this? |
@wetndusty where's this snippet exactly on the website? |
That's in the core @Trott |
Maybe move this issue there. |
I believe only the English docs are in core. I think the translations are down through CrowdIn. @nodejs/i18n |
it still english if you just change but if anyone change "Hello, world" to "你好世界" or "Привет, мир!" he or she don`t need to do something else to get working as expected sample |
Oh! I see now. Yeah, if you just want to change the |
This is valid for many examples and not just this one https://nodejs.org/dist/latest-v12.x/docs/api/http2.html#http2_server_side_example. In my opinion we should either use To be pedantic the examples work as intended and the problem only happens when changing the original data so this is expected. I mean if you are changing the example you should understand your change and what are the consequences that this entails (also update the value of the |
it sometime hard for newcomers - change hello world to local language is common practice - so change base code to be newcomers friendly variant is not so bad idea (IMHO) |
in many cases changing "Hello, World!" to "Привет, мир!" lead to encoding hell
i guess it not good for newcomers :(
here http2 sample
==========================
==================
and how it look in browser -> Hello World (Привет, мир!)
:(
The text was updated successfully, but these errors were encountered: