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 frame displaying the parsed markdown (unlike SO).
+5
A:
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?
KennyTM
2010-02-02 04:31:22
I need newline for the normal reasons. If you look at parsed markdown script, you will see that everything gets parsed down to an unbroken line. I need some way of preserving the original line breaks in the parsed markdown script that is easy for the java interpreter to find (in marked down script). Does that make sense?
piggles
2010-02-02 14:41:07
@Mechko: Can you use Unicode?
KennyTM
2010-02-02 15:44:32
Probably. I just never have :-p There are unassigned chars in unicode?
piggles
2010-02-02 17:20:14
@Mechko: You can use noncharacters (http://en.wikipedia.org/wiki/Mapping_of_Unicode_characters#Noncharacters). But the users will see a question mark thing so you need to transform your output. But if you can transform your output it may be easier to use `\r` or `\0` or `<br/>` etc.
KennyTM
2010-02-02 17:25:19
BTW there is also `\u2028` (line separator).
KennyTM
2010-02-02 17:31:21
+1
A:
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!
BobMcGee
2010-02-02 04:33:56
@David: Many programs aren't actually going to trigger the sound if they encounter BEL in a document.
BobMcGee
2010-02-02 04:47:08