Please, can you give me a list of non printable characters in java programming? Thank you in advance.
+1
A:
Java strings are unicode strings. Unicode doesn't have a concept of "non-printable" characters, exactly, but the ASCII non-printable range, along with several other characters, are considered Unicode control characters.
JSBangs
2010-06-29 15:33:46
+2
A:
Java uses the Unicode standard, so you should be asking about non-printable (non-printing?) characters in Unicode.
Matt Ball
2010-06-29 15:34:15
+1
A:
Are spaces printable? What about the private use area? Please modify the code to your definition of "printable" :)
import static java.lang.Character.*;
for (int i=0; i<MAX_CODE_POINT; i++) {
int t = getType(i);
boolean p = t == CONTROL || t == CONNECTOR_PUNCTUATION || t == CURRENCY_SYMBOL || t == DASH_PUNCTUATION || t == DECIMAL_DIGIT_NUMBER || t == ENCLOSING_MARK || t == END_PUNCTUATION || t == FINAL_QUOTE_PUNCTUATION || t == INITIAL_QUOTE_PUNCTUATION || t == LETTER_NUMBER || t == LOWERCASE_LETTER || t == MATH_SYMBOL || t == MODIFIER_LETTER || t == MODIFIER_SYMBOL || t == OTHER_LETTER || t == OTHER_NUMBER || t == OTHER_PUNCTUATION || t == OTHER_SYMBOL || t == START_PUNCTUATION || t == TITLECASE_LETTER || t == UPPERCASE_LETTER;
if (!p) {
System.out.println("Non printable codepoint " + i);
}
}
Jörn Horstmann
2010-06-29 16:16:48