ããããèãï¼ ä¿ºãæåã³ã¼ãã«ã¤ãã¦æãã¦ããã ãã®ï¼ï¼åæç¥èç·¨ï¼
ã¡ãã£ã¨ä¹
ã
ã®Javaãã¿ã§ããã
åããæ¸ãæºãã¦ãããæåã³ã¼ããã¨ã³ã³ã¼ãã«ã¤ãã¦ã®ãã¦ãã¦ãæ¸ãã¾ãã
ä»åã¯ã詳細ãªèª¬æã«å
¥ãåã«ãåæã«ãªãç¥èãç¨èªã«ã¤ãã¦èª¬æãã¦ããã¾ãã
æåã³ã¼ãã¨ã¨ã³ã³ã¼ãã£ã¦éãã®ï¼
æ°äººãããã§ã¯ãHTMLã®æåã³ã¼ãã¯UTF-8ã§ãé¡ããã¾ãã
å 輩社å¡ãæåã³ã¼ããããªãã¦ã¨ã³ã³ã¼ãã£ã³ã°ã§ããï¼ã
æ°äººããããã£ããããã¯ããããã§ã
æåã³ã¼ãã¨ã¨ã³ã³ã¼ãï¼ã¨ã³ã³ã¼ãã£ã³ã°ï¼ãæ··åãã¦ä½¿ã£ããããã¨ã
ã¡ãã£ã¨åç主義çãªäººã«æãããããããã§ããã©ã
大ã¾ãã«è¨ãã°ããæåã³ã¼ããã¯æåã«å²ãå½ã¦ããããæ°åãã®ãã¨ã§ã
ãã¨ã³ã³ã¼ããã¯æåã¨æ°åããããã³ã°ãããæ¹å¼ãã®ãã¨ã ã¨æãã¦ããã°ã大ããã¯å¤ãã¾ããã
ãã ããæåã³ã¼ããã¨ããè¨èã¯ããæ°åããæ¹å¼ãã®ä¸¡æ¹ã§ä½¿ãããã»ãã
æåä¸è¦§ã示ããCharsetãã¨ããæå³ã§ä½¿ããããã¨ãããã¾ãã
ãããUTF-8ã¯æåã³ã¼ããããªãï¼ãã£ã¦æãããã
ãWikpediaã«ã¯ãæ¥æ¬ã§ã¯ãEUC-JPãShift_JISãUTF-8ã®3ã¤ãè¯ã使ããã¦ããæåã³ã¼ãã§ããããã£ã¦æ¸ãã¦ã¾ãï¼ã
ã£ã¦åè«ããã°ã話ããããããã§ããããç¥ãã¾ããã
http://ja.wikipedia.org/wiki/文字コード
æåéåãæåã»ãããcharsetã£ã¦ä½ã ï¼
æ°äººãããã§ã¯ãHTMLã®æåã³ã¼ãã¯Windows-31jã§ãé¡ããã¾ãã
å 輩社å¡Aãæåã³ã¼ããããªãã¦ã¨ã³ã³ã¼ãã£ã³ã°ã§ããï¼ã
å 輩社å¡Bããããå³å¯ã«è¨ããªãCharsetã®æ¹ãè¯ããªãï¼ã
æ°äººããããã£ã¨ã»ã»ã»ã
ãæåã³ã¼ãããã¨ã³ã³ã¼ããã¨ä¸¦ãã§ãã使ãããè¨èã«ãCharsetããããã¾ãã
æ¥æ¬èªè¨³ããã¨ãæåã»ãããã¨ããæåéåãã¨ããè¨èã«ãªãã®ã§ããã
ãããã調ã¹ã¦ã¿ãã¨ãæåéåãã¨ãCharsetãã¯ãè¥å¹²ãå«ãæå³ãç°ãªã£ã¦ããããã§ãã
ãæåéåããWikipediaã§èª¿ã¹ã¦ã¿ãã¨ããã
å³å¯ãªæå³ã§ã¯ããUnicodeãã¨ãããæåéåãã«å¯¾ãã¦ãUTF-8ããUTF-16ããªã©ã®ãã¨ã³ã³ã¼ããæ¹å¼ãããã
åæ§ã«ããJIS X 0208ãã¨ãããæåéåãã«å¯¾ãã¦ãISO-2022-JPããEUC-JPããShift_JISããªã©ã®ãã¨ã³ã³ã¼ããæ¹å¼ãããã
ã¨ãã対å¿ä»ãã«ãªãããã§ãã
ã¾ããJavaã¨ã³ã¸ãã¢ã§ããç§ãã¡ãå©ç¨æ©ä¼ãå¤ããWindows-31jãã¯
ãJIS X 0201ããJIS X 0208ãã¨ãããæåéåãã«
ãNECç¹æ®æåãã¨ãIBMæ¡å¼µå¤åããå ããããæåéåãã ã¨è¨ããã¨ã«ãªãã¾ãã
ã§ã¯ããWindows-31jãã¨ããæåéåã«å¯¾ããã¨ã³ã³ã¼ãæ¹å¼ã¯ï¼
ã¨èãããã¨ããWindows-31jãã¨ããçãããã¾ããã
ãããªãã§ãã
çµå±ã®ã¨ãããæåéåã¨ã¨ã³ã³ã¼ãã¯ããªããªãåãé¢ããªãé¢ä¿ãªãã§ãã
ãããªèæ¯ããã£ã¦ããIANAã決ãããCharsetãã¨ããæ¦å¿µã¯
ãæåéåãã¨ãã¨ã³ã³ã¼ããã®ä¸¡æ¹ãå«ãã ãã®ã«ãªã£ã¦ãã¾ãã
WikipediaãJavadocãªã©ã«ããã®è¾ºãã«ã¤ãã¦ã®è¨è¿°ãããã¾ãã
ã¾ããæåéåã®ä¼¼ãç¨èªã¨ãã¦MIMEçã§å©ç¨ãããIANAã®charsetãããããcharsetã¯ç¬¦å·åæåéåã¨æå符å·åæ¹å¼ãåãããæ¦å¿µã§ãããå称ã¨å®æ ãä¸è´ãã¦ããªãã
文字集合 - Wikipedia
ãã®ã¯ã©ã¹ã®ååã¯ãRFC 2278 ã§ä½¿ç¨ããã¦ããç¨èªã«ç±æ¥ãã¦ãã¾ãããã®ããã¥ã¡ã³ãå ã§ããæåã»ãããã¯ã³ã¼ãåæåéåã¨æåã¨ã³ã³ã¼ãã£ã³ã°æ¹å¼ã®çµã¿åããã¨ãã¦å®ç¾©ããã¦ãã¾ãã
Charset - Java Platform SE 6
è¦ããã«ããCharsetãã¯ãæåéåãã¨ãã¨ã³ã³ã¼ãããå«ããã
å®ç¨ä¸ä½¿ããããç¨èªã ã¨è¦ãã¦ããã°ãééããªãã§ãããã
ãShift_JISãããUTF-8ãããWindows-31jãããã¿ã¼ããªãCharsetãã£ã¦å¼ã¶ãã¨ãã§ãã¾ãã
ãªã®ã§ãé¢åããã人ã¨è©±ãæã«ã¯ãCharsetãã¨è¨ã£ã¦ããã°å¤§ä¸å¤«ã§ãã
ã¡ãªã¿ã«Charsetã®èªã¿æ¹ã¯ããã£ã¼ã»ãããæ´¾ã¨ããã£ã©ã»ãããæ´¾ãããããã§ããã
ç§ã¯ããã£ã¼ã»ãããæ´¾ã§ãã
ãã£ã©ã»ãããªãcharasetã ããJKã
ã©ãããã°æåã®æåã³ã¼ãã確èªã§ããã®ï¼ ã¾ãããã®éã¯ï¼
æ°äººããããããã®æåã³ã¼ãã調ã¹ãããã§ãããã©ãããã°è¯ãã§ããï¼ã
å 輩社å¡ãæåã³ã¼ãä¸è¦§ãæ¤ç´¢ããã®ããæã£åãæ©ãããªã
æ°äººããããªãã»ã©ãã§ã¯éã«æåã³ã¼ãããã対å¿ããæåã調ã¹ããæã¯ãã©ãããã°è¯ãã§ããï¼ã
å 輩社å¡ãå°ãã¯ã°ã°ã£ã¦ã¿ãã°ï¼ã
æåã³ã¼ãã«ã¤ãã¦èª¿ã¹å§ããã¨ã
æåã³ã¼ãï¼ã0x82a0ãï¼ã¨æåï¼ãããï¼ãç¸äºå¤æããããªãæ©ä¼ããã¨ã¦ãå¢ãã¦ãã¾ãã
ã©ãããæ¹æ³ã§ããã°ç°¡åã«å¤æã§ããã®ããããã¤ãã®ææ³ã説æãã¾ãããã
ããã§ç´¹ä»ããæ¹æ³ã¯åºæ¬çã«Windowsåããªã®ã§ã
ããMacã§ã®ä¸æãå¤ææ¹æ³ãªã©ããã°ãã³ã¡ã³ãã§ãç¥ãããã ããã
Unicode(UTF-32) â æå
Windowsã«ä»å±ã®ã¯ã¼ãããããMicrosoft Wordãéãã
æåãå
¥åãã¦ãããAlt + Xããæ¼ä¸ãã¦ãã ããã
æåã¨æåã³ã¼ãï¼Unicodeï¼ãç¸äºå¤æãããã¨ãã§ãã¾ãã
3042 â ï¼Alt + Xï¼ â ã â ï¼Alt + Xï¼ â 3042
ãªããå³å¯ã«è¨ãã¨ããã§æå®ããUnicodeã¯UTF-32ã®ã³ã¼ãã§ãã
詳ããã¯ãã¾ããµãã²ã¼ããã¢ã«ã¤ãã¦èª¬æããæã«ã話ããã¾ãã
æåã³ã¼ãï¼Shift-JISãJISãUnicodeï¼ â æå
MS-IMEãONã«ããç¶æ
ã§æåã³ã¼ããæã¡è¾¼ã¿ã
F5ãã¼ãæ¼ãã°ããã®æåã³ã¼ãã«å¯¾å¿ããæåã«å¤æã§ãã¾ãã
æåã³ã¼ãã«ã¯ãShift-JISãJISãåºç¹ã³ã¼ããUnicodeã¨ãå¹
åºããã®ãå©ç¨ã§ãã¾ãã
ï¼ï¼ãï¼ â ï¼å¤æ確å®åã«F5ï¼ â è¦ãã
æå â æåã³ã¼ãï¼Shift-JISãUnicodeï¼
MS-IMEã«ã¯ãIMEãããã¨ããæåä¸è¦§ãä»å±ãã¦ãã¾ãã
ããããé å¼µã£ã¦å¯¾è±¡ã®æåãè¦ã¤ããã°ã
ãã®æåã®æåã³ã¼ãã確èªãããã¨ãã§ãã¾ãã
ãããã§æ¤ç´¢
ãããã«ããããæåã³ã¼ãä¸è¦§è¡¨ããæåå®ç¾©ã®æ¤ç´¢ãµã¤ããªã©ã§
確èªããã®ãè¯ãæ¹æ³ã§ãããã
http://ash.jp/code/unitbl21.htm
JISã³ã¼ãã®ç¯å²å
ã®æååãªãããã®ãµã¤ãã«ã¾ã¨ã¾ã£ã¦ãã¾ãã
http://www.fileformat.info/info/unicode/index.htm
ãã¡ãã¯ãæåãæåã³ã¼ãã®è©³ç´°ãæ¤ç´¢ã§ãããµã¤ãã§ãã
ãã ããä¸ã«æãã両æ¹ã®ãµã¤ãã¨ãã
Unicodeã®æåã«ã¤ãã¦ã¯Unicodeã³ã³ã½ã¼ã·ã¢ã ã®å®ç¾©ãå©ç¨ãã¦ãããã
å
¨è§ããã¯ã¹ã©ãã·ã¥ãªã©ãä¸é¨ã«ãããã³ã°ã®æªããç®æãããã¾ãã
Unicodeã®å®ç¾©ã解éã«ã¤ãã¦ã¯ãã¾ãããã詳ãã説æãã¾ããã
ã¾ã¨ã
- æåã³ã¼ããã¨ã³ã³ã¼ããæåã»ãããCharsetãªã©ã®è¨èã¯ä¸éãç解ãããã
- ãã®ããã§ããWindows-31jããUTF-8ããªã©ã¯ãCharsetãã¨å¼ã¶ã®ãç¡é£ã
- æåã¨æåã³ã¼ãã®ç¸äºå¤ææ¹æ³ã¯ãWordãIMEããããã¯ããããå©ç¨ãããã
次åã¯Javaã§ã®æåã³ã¼ãã®æ±ãã«ã¤ãã¦è§£èª¬ãã¾ãã