由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - 用react的试过中文么?
相关主题
sucks (转载)a question about CGI
php DOM parse 中文乱码问题 (转载)How to encode YYYY-MM-DD?
顺便问一个CreateFile问题 (转载)请教:JavaScript怎么复制一个node(含子节点)? (转载)
how to encoding UTF-8 to hexhow to login mitbbs with java code (转载)
怎么把 integer 转为 multi-byte integer format?请教:如何用Java get URL content是.swe并且是utf-16 encoding的文件
大家来看看这个纯Javascript实现的QR二维码生成器编码问题
求教, python 对于很奇怪的字符的encoding 怎么处理?Google Chrome 里还是夹带了私货
encode high cardinality categorical features[合集] how to know the encoding of a file
相关话题的讨论汇总
话题: file话题: 中文话题: utf话题: jsx话题: react
进入Programming版参与讨论
1 (共1页)
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 的大作中提到】
    : 问题是中文还显示的好好的。这是坑爹没商量。
    1 (共1页)
    进入Programming版参与讨论
    相关主题
    [合集] how to know the encoding of a file怎么把 integer 转为 multi-byte integer format?
    什么是 multi-byte string?大家来看看这个纯Javascript实现的QR二维码生成器
    how to get client locale inside the running application?求教, python 对于很奇怪的字符的encoding 怎么处理?
    What's the problem with 'ascii' codec? (转载)encode high cardinality categorical features
    sucks (转载)a question about CGI
    php DOM parse 中文乱码问题 (转载)How to encode YYYY-MM-DD?
    顺便问一个CreateFile问题 (转载)请教:JavaScript怎么复制一个node(含子节点)? (转载)
    how to encoding UTF-8 to hexhow to login mitbbs with java code (转载)
    相关话题的讨论汇总
    话题: file话题: 中文话题: utf话题: jsx话题: react