17

三种不同的"空格" Unicode(u00A0,u0020,u3000)及区别 - 阿航的技术小站

 3 years ago
source link: https://www.bugcatt.com/archives/2217
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

今天阿航在使用Dart的jsonEncoder做json字符串解析时, 一直报错. 但是使用bejson等网站进行解析时却不会出错. 本篇文章就来记录下问题原因. 以及三种不同的”空格” Unicode(\u00A0,\u0020,\u3000)及区别

三种空格的区别

一张表格来分别解释几种空格:

Unicode编码含义用途\u00A0不间断空格在Office中比较常见, 使某个单词在结尾处不会被自动换行显示(快捷键Ctrl+Shift+空格)\u0020半角空格(英文符号)正常的空格, 点击键盘的空格键就会输入. 在代码中常用\u3000全角空格(中文符号)用处并不多. 可以用于中文的文章.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK