fork(3) download
  1. import java.text.*;
  2. import java.util.*;
  3. class Main
  4. {
  5.  
  6. public static void main (String[] args) throws java.lang.Exception
  7. {
  8. for(int i = 0; i < 256 ; ++i) {
  9. char c = (char) i;
  10. System.out.printf("\\u%04x", i);
  11. if (Character.isLetterOrDigit(c) || Character.isSpaceChar(c)) {
  12. System.out.println(" -> " + c + " : is letter or digit or space");
  13. } else {
  14. System.out.println(" -> " + c + " : is NOT letter or digit or space");
  15. }/**/
  16. }
  17. System.out.println("---------------------------------------------------");
  18. System.out.println("Separator!!");
  19. System.out.println("SPACE SEPARATOR: ");
  20. System.out.printf("\\u%04x", (int)Character.SPACE_SEPARATOR);
  21. System.out.println("LINE SEPARATOR: ");
  22. System.out.printf("\\u%04x", (int)Character.LINE_SEPARATOR);
  23. System.out.println("PARAGRAPH SEPARATOR: ");
  24. System.out.printf("\\u%04x", (int)Character.PARAGRAPH_SEPARATOR);
  25.  
  26. /*String str = "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000a\u000b\u000c\u000d\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f\u0020\u0021\u0022\u0023\u0024\u0025\u0026\u0027\u0028\u0029\u002a\u002b\u002c\u002d\u002e\u002f\u0030\u0031\u0032\u0033\u0034\u0035\u0036\u0037\u0038\u0039\u003a\u003b\u003c\u003d\u003e\u003f\u0040\u0041\u0042\u0043\u0044\u0045\u0046\u0047\u0048\u0049\u004a\u004b\u004c\u004d\u004e\u004f\u0050\u0051\u0052\u0053\u0054\u0055\u0056\u0057\u0058\u0059\u005a\u005b\u005c\u005d\u005e\u005f\u0060\u0061\u0062\u0063\u0064\u0065\u0066\u0067\u0068\u0069\u006a\u006b\u006c\u006d\u006e\u006f\u0070\u0071\u0072\u0073\u0074\u0075\u0076\u0077\u0078\u0079\u007a\u007b\u007c\u007d\u007e\u007f";
  27.   for (int i = 0 ; i < str.length() ; i++) {
  28.   char c = str.charAt(i);
  29.   if (Character.isLetterOrDigit(c)) {
  30.   System.out.println((i+1) + ": " + c);
  31.   }
  32.   }*/
  33. }
  34.  
  35. public static void printSMS()
  36. {
  37. System.out.println("Convert to unicode");
  38. String[] chiStr =
  39. {
  40. "星展銀行: <提示>閣下已於<DD-MM-YYYY HH:MM>重設iBanking密碼。請於下次登入時使用新密碼。",
  41. "星展銀行:轉賬至海外戶口<a/c no.>,<ccy><transaction amount>,交易編號 <the last 10 digits of the txn ref. no.>,OTP: <opaque>-<OTP>。",
  42. "星展銀行:<提示>閣下於<DD-MM-YYYY HH:MM>遞交指示,轉賬<ccy><transaction amount>至海外戶口<a/c no.>。",
  43. "星展銀行:<提示>閣下轉賬<ccy><transaction amount>至海外戶口<a/c no.>的指示已經辦妥。",
  44. "星展銀行:<提示>閣下轉賬<ccy><transaction amount>至海外戶口<a/c no.>的指示已經被拒。",
  45. "星展銀行:<提示>閣下轉賬<ccy><transaction amount>至海外戶口<a/c no.>的指示已經取消。"
  46. };
  47. int c = 0;
  48. for(int i = 0 ; i < chiStr.length ; ++i) {
  49. System.out.print((i+1) + ": " + chiStr[i] + "\n -> ");
  50. for(int j = 0 ; j < chiStr[i].length() ; j++) {
  51. c = (int)chiStr[i].charAt(j);
  52. if (c > 128) {
  53. System.out.printf("\\u%04x", c);
  54. } else {
  55. System.out.printf("%c", (char)c);
  56. }
  57. }
  58. System.out.println("\n");
  59. }
  60. System.out.println("---------------------------------------------------");
  61. System.out.println("Convert from unicode!!!");
  62. String[] unicode =
  63. {
  64. "DBS Bank: <Alert>You have reset iBanking Password on <<DATE>>. Please use this new Password for your next logon.",
  65. "\u661f\u5c55\u9280\u884c\uff1a <\u63d0\u793a>\u95a3\u4e0b\u5df2\u65bc<<DATE>>\u91cd\u8a2diBanking\u5bc6\u78bc\u3002\u8acb\u65bc\u4e0b\u6b21\u767b\u5165\u6642\u4f7f\u7528\u65b0\u5bc6\u78bc\u3002",
  66. "DBS Bank: Funds transfer (overseas) to <<AC>>, Amount: <<TXN_CUR>><<TXN_AMO>>, Tran Ref:<<TXN_REF>>, OTP: <<OTP>>.",
  67. "\u661f\u5c55\u9280\u884c\uff1a\u8f49\u8cec\u81f3\u6d77\u5916\u6236\u53e3<<AC>>\uff0c<<TXN_CUR>><<TXN_AMO>>\uff0c\u4ea4\u6613\u7de8\u865f<<TXN_REF>>\uff0cOTP: <<OTP>>\u3002",
  68. "DBS Bank: <Alert>You have submitted a funds transfer (overseas) instruction of <<TXN_CUR>><<TXN_AMO>> to <<AC>> on <<DATE>>.",
  69. "\u661f\u5c55\u9280\u884c\uff1a<\u63d0\u793a>\u95a3\u4e0b\u65bc<<DATE>>\u905e\u4ea4\u6307\u793a\uff0c\u8f49\u8cec<<TXN_CUR>><<TXN_AMO>>\u81f3\u6d77\u5916\u6236\u53e3<<AC>>\u3002",
  70. "DBS Bank: <Alert>Your funds transfer (overseas) instruction of <<TXN_CUR>><<TXN_AMO>> to <<AC>> has been processed.",
  71. "\u661f\u5c55\u9280\u884c\uff1a<\u63d0\u793a>\u95a3\u4e0b\u8f49\u8cec<<TXN_CUR>><<TXN_AMO>>\u81f3\u6d77\u5916\u6236\u53e3<<AC>>\u7684\u6307\u793a\u5df2\u7d93\u8fa6\u59a5\u3002",
  72. "DBS Bank: <Alert>Your funds transfer (overseas) instruction of <<TXN_CUR>><<TXN_AMO>> to <<AC>> has been rejected.",
  73. "\u661f\u5c55\u9280\u884c\uff1a<\u63d0\u793a>\u95a3\u4e0b\u8f49\u8cec<<TXN_CUR>><<TXN_AMO>>\u81f3\u6d77\u5916\u6236\u53e3<<AC>>\u7684\u6307\u793a\u5df2\u7d93\u88ab\u62d2\u3002",
  74. "DBS Bank: <Alert>Your funds transfer (overseas) instruction of <<TXN_CUR>><<TXN_AMO>> to <<AC>> has been cancelled.",
  75. "\u661f\u5c55\u9280\u884c\uff1a<\u63d0\u793a>\u95a3\u4e0b\u8f49\u8cec<<TXN_CUR>><<TXN_AMO>>\u81f3\u6d77\u5916\u6236\u53e3<<AC>>\u7684\u6307\u793a\u5df2\u7d93\u53d6\u6d88\u3002"
  76. };
  77. for(int i = 0 ; i < unicode.length ; ++i) {
  78. System.out.println((i+1) + " -> " + unicode[i] + "\n");
  79. }
  80. System.out.println("---------------------------------------------------");
  81. System.out.println("Sequence of TAG!!!");
  82. for(int i = 0 ; i < unicode.length ; ++i) {
  83. System.out.print((i+1) + " -> ");
  84. for (int j = 0 ; j < unicode[i].length() ; ++j) {
  85. if(unicode[i].charAt(j) < 128) {
  86. System.out.print(unicode[i].charAt(j));
  87. }
  88. }
  89. System.out.println();
  90. }
  91. }
  92. }
Success #stdin #stdout 0.08s 245952KB
stdin
Standard input is empty
stdout
\u0000 ->  : is NOT letter or digit or space
\u0001 ->  : is NOT letter or digit or space
\u0002 ->  : is NOT letter or digit or space
\u0003 ->  : is NOT letter or digit or space
\u0004 ->  : is NOT letter or digit or space
\u0005 ->  : is NOT letter or digit or space
\u0006 ->  : is NOT letter or digit or space
\u0007 ->  : is NOT letter or digit or space
\u0008 ->  : is NOT letter or digit or space
\u0009 -> 	 : is NOT letter or digit or space
\u000a -> 
 : is NOT letter or digit or space
\u000b ->  : is NOT letter or digit or space
\u000c ->  : is NOT letter or digit or space
\u000d -> 
 : is NOT letter or digit or space
\u000e ->  : is NOT letter or digit or space
\u000f ->  : is NOT letter or digit or space
\u0010 ->  : is NOT letter or digit or space
\u0011 ->  : is NOT letter or digit or space
\u0012 ->  : is NOT letter or digit or space
\u0013 ->  : is NOT letter or digit or space
\u0014 ->  : is NOT letter or digit or space
\u0015 ->  : is NOT letter or digit or space
\u0016 ->  : is NOT letter or digit or space
\u0017 ->  : is NOT letter or digit or space
\u0018 ->  : is NOT letter or digit or space
\u0019 ->  : is NOT letter or digit or space
\u001a ->  : is NOT letter or digit or space
\u001b ->  : is NOT letter or digit or space
\u001c ->  : is NOT letter or digit or space
\u001d ->  : is NOT letter or digit or space
\u001e ->  : is NOT letter or digit or space
\u001f ->  : is NOT letter or digit or space
\u0020 ->   : is letter or digit or space
\u0021 -> ! : is NOT letter or digit or space
\u0022 -> " : is NOT letter or digit or space
\u0023 -> # : is NOT letter or digit or space
\u0024 -> $ : is NOT letter or digit or space
\u0025 -> % : is NOT letter or digit or space
\u0026 -> & : is NOT letter or digit or space
\u0027 -> ' : is NOT letter or digit or space
\u0028 -> ( : is NOT letter or digit or space
\u0029 -> ) : is NOT letter or digit or space
\u002a -> * : is NOT letter or digit or space
\u002b -> + : is NOT letter or digit or space
\u002c -> , : is NOT letter or digit or space
\u002d -> - : is NOT letter or digit or space
\u002e -> . : is NOT letter or digit or space
\u002f -> / : is NOT letter or digit or space
\u0030 -> 0 : is letter or digit or space
\u0031 -> 1 : is letter or digit or space
\u0032 -> 2 : is letter or digit or space
\u0033 -> 3 : is letter or digit or space
\u0034 -> 4 : is letter or digit or space
\u0035 -> 5 : is letter or digit or space
\u0036 -> 6 : is letter or digit or space
\u0037 -> 7 : is letter or digit or space
\u0038 -> 8 : is letter or digit or space
\u0039 -> 9 : is letter or digit or space
\u003a -> : : is NOT letter or digit or space
\u003b -> ; : is NOT letter or digit or space
\u003c -> < : is NOT letter or digit or space
\u003d -> = : is NOT letter or digit or space
\u003e -> > : is NOT letter or digit or space
\u003f -> ? : is NOT letter or digit or space
\u0040 -> @ : is NOT letter or digit or space
\u0041 -> A : is letter or digit or space
\u0042 -> B : is letter or digit or space
\u0043 -> C : is letter or digit or space
\u0044 -> D : is letter or digit or space
\u0045 -> E : is letter or digit or space
\u0046 -> F : is letter or digit or space
\u0047 -> G : is letter or digit or space
\u0048 -> H : is letter or digit or space
\u0049 -> I : is letter or digit or space
\u004a -> J : is letter or digit or space
\u004b -> K : is letter or digit or space
\u004c -> L : is letter or digit or space
\u004d -> M : is letter or digit or space
\u004e -> N : is letter or digit or space
\u004f -> O : is letter or digit or space
\u0050 -> P : is letter or digit or space
\u0051 -> Q : is letter or digit or space
\u0052 -> R : is letter or digit or space
\u0053 -> S : is letter or digit or space
\u0054 -> T : is letter or digit or space
\u0055 -> U : is letter or digit or space
\u0056 -> V : is letter or digit or space
\u0057 -> W : is letter or digit or space
\u0058 -> X : is letter or digit or space
\u0059 -> Y : is letter or digit or space
\u005a -> Z : is letter or digit or space
\u005b -> [ : is NOT letter or digit or space
\u005c -> \ : is NOT letter or digit or space
\u005d -> ] : is NOT letter or digit or space
\u005e -> ^ : is NOT letter or digit or space
\u005f -> _ : is NOT letter or digit or space
\u0060 -> ` : is NOT letter or digit or space
\u0061 -> a : is letter or digit or space
\u0062 -> b : is letter or digit or space
\u0063 -> c : is letter or digit or space
\u0064 -> d : is letter or digit or space
\u0065 -> e : is letter or digit or space
\u0066 -> f : is letter or digit or space
\u0067 -> g : is letter or digit or space
\u0068 -> h : is letter or digit or space
\u0069 -> i : is letter or digit or space
\u006a -> j : is letter or digit or space
\u006b -> k : is letter or digit or space
\u006c -> l : is letter or digit or space
\u006d -> m : is letter or digit or space
\u006e -> n : is letter or digit or space
\u006f -> o : is letter or digit or space
\u0070 -> p : is letter or digit or space
\u0071 -> q : is letter or digit or space
\u0072 -> r : is letter or digit or space
\u0073 -> s : is letter or digit or space
\u0074 -> t : is letter or digit or space
\u0075 -> u : is letter or digit or space
\u0076 -> v : is letter or digit or space
\u0077 -> w : is letter or digit or space
\u0078 -> x : is letter or digit or space
\u0079 -> y : is letter or digit or space
\u007a -> z : is letter or digit or space
\u007b -> { : is NOT letter or digit or space
\u007c -> | : is NOT letter or digit or space
\u007d -> } : is NOT letter or digit or space
\u007e -> ~ : is NOT letter or digit or space
\u007f ->  : is NOT letter or digit or space
\u0080 -> € : is NOT letter or digit or space
\u0081 ->  : is NOT letter or digit or space
\u0082 -> ‚ : is NOT letter or digit or space
\u0083 -> ƒ : is NOT letter or digit or space
\u0084 -> „ : is NOT letter or digit or space
\u0085 -> … : is NOT letter or digit or space
\u0086 -> † : is NOT letter or digit or space
\u0087 -> ‡ : is NOT letter or digit or space
\u0088 -> ˆ : is NOT letter or digit or space
\u0089 -> ‰ : is NOT letter or digit or space
\u008a -> Š : is NOT letter or digit or space
\u008b -> ‹ : is NOT letter or digit or space
\u008c -> Œ : is NOT letter or digit or space
\u008d ->  : is NOT letter or digit or space
\u008e -> Ž : is NOT letter or digit or space
\u008f ->  : is NOT letter or digit or space
\u0090 ->  : is NOT letter or digit or space
\u0091 -> ‘ : is NOT letter or digit or space
\u0092 -> ’ : is NOT letter or digit or space
\u0093 -> “ : is NOT letter or digit or space
\u0094 -> ” : is NOT letter or digit or space
\u0095 -> • : is NOT letter or digit or space
\u0096 -> – : is NOT letter or digit or space
\u0097 -> — : is NOT letter or digit or space
\u0098 -> ˜ : is NOT letter or digit or space
\u0099 -> ™ : is NOT letter or digit or space
\u009a -> š : is NOT letter or digit or space
\u009b -> › : is NOT letter or digit or space
\u009c -> œ : is NOT letter or digit or space
\u009d ->  : is NOT letter or digit or space
\u009e -> ž : is NOT letter or digit or space
\u009f -> Ÿ : is NOT letter or digit or space
\u00a0 ->   : is letter or digit or space
\u00a1 -> ¡ : is NOT letter or digit or space
\u00a2 -> ¢ : is NOT letter or digit or space
\u00a3 -> £ : is NOT letter or digit or space
\u00a4 -> ¤ : is NOT letter or digit or space
\u00a5 -> ¥ : is NOT letter or digit or space
\u00a6 -> ¦ : is NOT letter or digit or space
\u00a7 -> § : is NOT letter or digit or space
\u00a8 -> ¨ : is NOT letter or digit or space
\u00a9 -> © : is NOT letter or digit or space
\u00aa -> ª : is letter or digit or space
\u00ab -> « : is NOT letter or digit or space
\u00ac -> ¬ : is NOT letter or digit or space
\u00ad -> ­ : is NOT letter or digit or space
\u00ae -> ® : is NOT letter or digit or space
\u00af -> ¯ : is NOT letter or digit or space
\u00b0 -> ° : is NOT letter or digit or space
\u00b1 -> ± : is NOT letter or digit or space
\u00b2 -> ² : is NOT letter or digit or space
\u00b3 -> ³ : is NOT letter or digit or space
\u00b4 -> ´ : is NOT letter or digit or space
\u00b5 -> µ : is letter or digit or space
\u00b6 -> ¶ : is NOT letter or digit or space
\u00b7 -> · : is NOT letter or digit or space
\u00b8 -> ¸ : is NOT letter or digit or space
\u00b9 -> ¹ : is NOT letter or digit or space
\u00ba -> º : is letter or digit or space
\u00bb -> » : is NOT letter or digit or space
\u00bc -> ¼ : is NOT letter or digit or space
\u00bd -> ½ : is NOT letter or digit or space
\u00be -> ¾ : is NOT letter or digit or space
\u00bf -> ¿ : is NOT letter or digit or space
\u00c0 -> À : is letter or digit or space
\u00c1 -> Á : is letter or digit or space
\u00c2 -> Â : is letter or digit or space
\u00c3 -> Ã : is letter or digit or space
\u00c4 -> Ä : is letter or digit or space
\u00c5 -> Å : is letter or digit or space
\u00c6 -> Æ : is letter or digit or space
\u00c7 -> Ç : is letter or digit or space
\u00c8 -> È : is letter or digit or space
\u00c9 -> É : is letter or digit or space
\u00ca -> Ê : is letter or digit or space
\u00cb -> Ë : is letter or digit or space
\u00cc -> Ì : is letter or digit or space
\u00cd -> Í : is letter or digit or space
\u00ce -> Î : is letter or digit or space
\u00cf -> Ï : is letter or digit or space
\u00d0 -> Ð : is letter or digit or space
\u00d1 -> Ñ : is letter or digit or space
\u00d2 -> Ò : is letter or digit or space
\u00d3 -> Ó : is letter or digit or space
\u00d4 -> Ô : is letter or digit or space
\u00d5 -> Õ : is letter or digit or space
\u00d6 -> Ö : is letter or digit or space
\u00d7 -> × : is NOT letter or digit or space
\u00d8 -> Ø : is letter or digit or space
\u00d9 -> Ù : is letter or digit or space
\u00da -> Ú : is letter or digit or space
\u00db -> Û : is letter or digit or space
\u00dc -> Ü : is letter or digit or space
\u00dd -> Ý : is letter or digit or space
\u00de -> Þ : is letter or digit or space
\u00df -> ß : is letter or digit or space
\u00e0 -> à : is letter or digit or space
\u00e1 -> á : is letter or digit or space
\u00e2 -> â : is letter or digit or space
\u00e3 -> ã : is letter or digit or space
\u00e4 -> ä : is letter or digit or space
\u00e5 -> å : is letter or digit or space
\u00e6 -> æ : is letter or digit or space
\u00e7 -> ç : is letter or digit or space
\u00e8 -> è : is letter or digit or space
\u00e9 -> é : is letter or digit or space
\u00ea -> ê : is letter or digit or space
\u00eb -> ë : is letter or digit or space
\u00ec -> ì : is letter or digit or space
\u00ed -> í : is letter or digit or space
\u00ee -> î : is letter or digit or space
\u00ef -> ï : is letter or digit or space
\u00f0 -> ð : is letter or digit or space
\u00f1 -> ñ : is letter or digit or space
\u00f2 -> ò : is letter or digit or space
\u00f3 -> ó : is letter or digit or space
\u00f4 -> ô : is letter or digit or space
\u00f5 -> õ : is letter or digit or space
\u00f6 -> ö : is letter or digit or space
\u00f7 -> ÷ : is NOT letter or digit or space
\u00f8 -> ø : is letter or digit or space
\u00f9 -> ù : is letter or digit or space
\u00fa -> ú : is letter or digit or space
\u00fb -> û : is letter or digit or space
\u00fc -> ü : is letter or digit or space
\u00fd -> ý : is letter or digit or space
\u00fe -> þ : is letter or digit or space
\u00ff -> ÿ : is letter or digit or space
---------------------------------------------------
Separator!!
SPACE SEPARATOR: 
\u000cLINE SEPARATOR: 
\u000dPARAGRAPH SEPARATOR: 
\u000e