React Javascript displaying/decoding unicode characters

后端 未结 5 1426
日久生厌
日久生厌 2021-01-03 20:13

I have a string in unicode that i need to convert. I need to render the string with \\u00f3 to ó. This is an example, it should happen with all other types of characters, á

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-03 20:43

    Just pass it as a JS string:

    
    

    No need to do any manual processing (which is error prone).

    Fiddle: https://jsfiddle.net/ffffdf7o70/5/

提交回复
热议问题