T********i 发帖数: 2416 | 1 单独的一个jsx模块。
就是想显示点中文。结果
{'中文'}
完全按照做的
https://facebook.github.io/react/docs/jsx-gotchas.html
然后
browserify -t babelify
结果显示乱码????
英文就没事。我99%肯定是bug。这个是半成品? |
c********1 发帖数: 5269 | 2 Do you need to specify [ html encode] in html file header?
【在 T********i 的大作中提到】 : 单独的一个jsx模块。 : 就是想显示点中文。结果 : {'中文'} : 完全按照做的 : https://facebook.github.io/react/docs/jsx-gotchas.html : 然后 : browserify -t babelify : 结果显示乱码???? : 英文就没事。我99%肯定是bug。这个是半成品?
|
T********i 发帖数: 2416 | 3 Of course already did.
jsx file is a separate file.
Why not test it by yourself?
【在 c********1 的大作中提到】 : Do you need to specify [ html encode] in html file header? :
|
h******b 发帖数: 6055 | 4 react-china.org也算有一定活跃度了,应该不可能有这么致命的bug。
应该是browserify -t babelify的问题,或者如楼上所说的,文档本身不是utf-8。
您贴个codepen或者plunker吧。
魏老师也试水了,欢迎欢迎。我把您那行代码插入这个hello world里了似乎没有问题:
http://codepen.io/anon/pen/NGYojN
【在 c********1 的大作中提到】 : Do you need to specify [ html encode] in html file header? :
|
c********1 发帖数: 5269 | 5 Make sure the Chinese characters in your file are utf-8 encoded.
【在 T********i 的大作中提到】 : Of course already did. : jsx file is a separate file. : Why not test it by yourself?
|
T********i 发帖数: 2416 | 6 操他妈的WebStorm缺省js文件存储格式不是UTF-8的。
需要到File->Settings
Editor->File Encodings然后一个个文件改过来。
这他妈多脑残才能做成这样?
【在 c********1 的大作中提到】 : Make sure the Chinese characters in your file are utf-8 encoded.
|
c********1 发帖数: 5269 | 7 A lot of other IDEs have similar issues.
【在 T********i 的大作中提到】 : 操他妈的WebStorm缺省js文件存储格式不是UTF-8的。 : 需要到File->Settings : Editor->File Encodings然后一个个文件改过来。 : 这他妈多脑残才能做成这样?
|
T********i 发帖数: 2416 | 8 问题是中文还显示的好好的。这是坑爹没商量。
【在 c********1 的大作中提到】 : A lot of other IDEs have similar issues.
|
c********1 发帖数: 5269 | 9 Sometime, I use a binary editor to check if the encoded is correct.
【在 T********i 的大作中提到】 : 问题是中文还显示的好好的。这是坑爹没商量。
|