From 4023be9612913d9ba5547c6c50945737bce7ed90 Mon Sep 17 00:00:00 2001 From: dchandler Date: Tue, 11 Nov 2003 03:43:26 +0000 Subject: [PATCH] Better prettyprinting. Untested. --- source/org/thdl/tib/text/tshegbar/UnicodeUtils.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/org/thdl/tib/text/tshegbar/UnicodeUtils.java b/source/org/thdl/tib/text/tshegbar/UnicodeUtils.java index 5f18e32..466ae7a 100644 --- a/source/org/thdl/tib/text/tshegbar/UnicodeUtils.java +++ b/source/org/thdl/tib/text/tshegbar/UnicodeUtils.java @@ -319,7 +319,6 @@ public class UnicodeUtils implements UnicodeConstants { || cp == '^' || cp == '&' || cp == '*' - || cp == '\t' || cp == ':' || cp == '[' || cp == ']' @@ -329,6 +328,13 @@ public class UnicodeUtils implements UnicodeConstants { || cp == '}') return new String(new char[] { cp }); } + if ('\t' == cp) + return "\\t"; + if ('\n' == cp) + return "\\n"; + if ('\r' == cp) + return "\\r"; + if (cp < '\u0010') return "\\u000" + Integer.toHexString((int)cp); else if (cp < '\u0100')