1 21 22 package nu.xom; 23 24 import java.io.Writer ; 25 26 35 class ISOArabicWriter extends TextWriter { 36 37 ISOArabicWriter(Writer out, String encoding) { 38 super(out, encoding); 39 } 40 41 44 boolean needsEscaping(char c) { 45 if (c <= 0xA0) return false; 46 switch (c) { 47 case 0x060C: return false; case 0x060D: return true; case 0x060E: return true; case 0x060F: return true; case 0x0610: return true; case 0x0611: return true; case 0x0612: return true; case 0x0613: return true; case 0x0614: return true; case 0x0615: return true; case 0x0616: return true; case 0x0617: return true; case 0x0618: return true; case 0x0619: return true; case 0x061A: return true; case 0x061B: return false; case 0x061C: return true; case 0x061D: return true; case 0x061E: return true; case 0x061F: return false; case 0x0620: return true; case 0x0621: return false; case 0x0622: return false; case 0x0623: return false; case 0x0624: return false; case 0x0625: return false; case 0x0626: return false; case 0x0627: return false; case 0x0628: return false; case 0x0629: return false; case 0x062A: return false; case 0x062B: return false; case 0x062C: return false; case 0x062D: return false; case 0x062E: return false; case 0x062F: return false; case 0x0630: return false; case 0x0631: return false; case 0x0632: return false; case 0x0633: return false; case 0x0634: return false; case 0x0635: return false; case 0x0636: return false; case 0x0637: return false; case 0x0638: return false; case 0x0639: return false; case 0x063A: return false; case 0x063B: return true; case 0x063C: return true; case 0x063D: return true; case 0x063E: return true; case 0x063F: return true; case 0x0640: return false; case 0x0641: return false; case 0x0642: return false; case 0x0643: return false; case 0x0644: return false; case 0x0645: return false; case 0x0646: return false; case 0x0647: return false; case 0x0648: return false; case 0x0649: return false; case 0x064A: return false; case 0x064B: return false; case 0x064C: return false; case 0x064D: return false; case 0x064E: return false; case 0x064F: return false; case 0x0650: return false; case 0x0651: return false; case 0x0652: return false; } 119 switch (c) { case 0x00A4: return false; case 0x00AD: return false; } 123 124 return true; 125 126 } 127 128 } | Popular Tags |