Unicode spaces

http://www.cs.tut.fi/~jkorpela/chars/spaces.html

 

 

Space characters in Unicode
Code Name of the characterSampleWidth of the character
U+0020SPACE  空格 foo bar Depends on font, often adjusted (see below)
U+00A0NO-BREAK SPACE foo  bar As a space, but often not adjusted
U+2000EN QUAD foo  bar 1 en (= 1/2 em)
U+2001EM QUAD foo  bar 1 em (nominally, the height of the font)
U+2002EN SPACE foo  bar 1 en (= 1/2 em)
U+2003EM SPACE foo  bar 1 em
U+2004THREE-PER-EM SPACE foo  bar 1/3 em
U+2005FOUR-PER-EM SPACE foo  bar 1/4 em
U+2006SIX-PER-EM SPACE foo  bar 1/6 em
U+2007FIGURE SPACE foo  bar “Tabular width”, the width of digits
U+2008PUNCTUATION SPACE foo  bar The width of a period “.”
U+2009THIN SPACE foo  bar 1/5 em (or sometimes 1/6 em)
U+200AHAIR SPACE foo  bar Narrower than THIN SPACE
U+200BZERO WIDTH SPACE foo ​bar Nominally no width, but may expand
U+202FNARROW NO-BREAK SPACE foo  bar Narrower than NO-BREAK SPACE (or SPACE )
U+205FMEDIUM MATHEMATICAL SPACE foo  bar 4/18 em
U+3000IDEOGRAPHIC SPACE foo  bar The width of ideographic (CJK ) characters.
U+FEFFZERO WIDTH NO-BREAK SPACE foo bar

No width (the character is invisible)

 

' ' 相当于\u0020 空格<SP>
'\n' 相当于\u000a 换行<LF>
'\r' 相当于\u000d 回车<CR>
'\t' 相当于\u0009 水平制表符<TAB>
'\f' 相当于\u000c 换页
'\x0b' 垂直制表符<VT>
'\xa0' 相当于\u0160,亦即'&#160;' 就即'&nbsp;' 不断行的空白(1个字符宽度)<NBSP> No-break Space
'\2002'..'\u200a' 定宽空格Fixed width spaces
\u2002即'&ensp;'半个空白(1个字符宽度)
\u2003即'&emsp;'一个空白(2个字符宽度)
'\u200b' 零宽空格Zero-width Space
'\u2028' 行分隔符 <LS> (我们使用word打文章时每行后出现的小符号)
'\u2029' 段落分隔符<PS>(类推)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值