ãã®æ°åä½ï¼ï¼
org.apache.commons.lang.RandomStringUtils ã§ã
ã©ã³ãã çæã®æååã£ã¦Characters will be chosen from the set of all characters.ã£ã¦
ãããã¦ããã©ã©ããªãã ããã¨æã£ã¦ã½ã¼ã¹ã¿ã¦ã¿ãã
ãã®56320ã¨ãã®æ°åä½ï¼ï¼ï¼ï¼ï¼
if(ch >= 56320 && ch <= 57343) { if(count == 0) { count++; } else { // low surrogate, insert high surrogate after putting it in buffer[count] = ch; count--; buffer[count] = (char) (55296 + random.nextInt(128)); } } else if(ch >= 55296 && ch <= 56191) { if(count == 0) { count++; } else { // high surrogate, insert low surrogate before putting it in buffer[count] = (char) (56320 + random.nextInt(128)); count--; buffer[count] = ch; } } else if(ch >= 56192 && ch <= 56319) { // private high surrogate, no effing clue, so skip it count++; } else { buffer[count] = ch; }
-
- -
@yoshiori hex ã«ãã¦ããã£ã¦ã¿ãã°ãããã¨ããããªã¼
http://wassr.jp/user/tokuhirom/statuses/51ojFw9Qqe
In [1]: hex(56320) Out[1]: '0xdc00' In [2]: hex(57343) Out[2]: '0xdfff'
ãµãã²ã¼ãæåã®å¤å¥?
ããã¡ãã£ã¨ããã¹ã¦ã¿ãã
-
- -
ãã£ã調ã¹ãæ°åã¯ä¸ä½ãµãã²ã¼ãã®ç¯å²ã ã£ãã
ã¤ã¾ããå¶å¾¡æå以å¤ã®æ¬å½ã«ãã¹ã¦ã®æåãã(ãµãã²ã¼ããã¢ã使ç¨ããæåãå«ã)
ã©ã³ãã ã§æååãçæãããã£ã½ãã
ããããª