开发者

Unassigned chars in the ascii spectrum?

开发者 https://www.devze.com 2022-12-18 14:26 出处:网络
Are there any unassigned, invisible, characters in the ascii spectrum that I could safely use as newline markers?The idea is to build a Java wordprocessor to edit Markdown in a wysiwyg fashion (like S

Are there any unassigned, invisible, characters in the ascii spectrum that I could safely use as newline markers? The idea is to build a Java wordprocessor to edit Markdown in a wysiwyg fashion (like SO) but in the fr开发者_JAVA百科ame displaying the parsed markdown (unlike SO).


Every character in ASCII (0x00 - 0x7F) (http://en.wikipedia.org/wiki/ASCII) has been assigned a proper meaning. But why don't you simply use \n (0x0a) as newline?


There are no UNASSIGNED characters, but BEL, NUL, and several other special characters will be invisible to the user and may be safe to use for your purposes.

Test carefully though!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号