Are all non-printable characters control characters?

自闭症网瘾萝莉.ら 提交于 2019-12-10 20:53:51

问题


Does this (perldoc unicode) mean that all non-printable characters are control-characters?

\p{Print}

This matches any character that is graphical or blank, except controls.

回答1:


If invisible whitespace/blank characters are considered printable, then yes, that only leaves control characters as unprintable.

But if you don't consider whitespace/blank characters such as line separator printable, then no.




回答2:


This will tell you for sure:

diff -U0 \
      <( unichars -au '\P{Print}'   ) \
      <( unichars -au '\p{Control}' ) \
   && echo No differences

unichars comes from Unicode::Tussle

I can't run it before Monday.



来源:https://stackoverflow.com/questions/11590810/are-all-non-printable-characters-control-characters

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!