ã¯ããã«
ãã®èšäºã®ãããã¯ã¯éåžžã«åºç¯å²ã§ããããã¹ãŠã®ãã¥ã¢ã³ã¹ã®è©³çŽ°ãã€è©³çŽ°ãªåæãæåŸ ãããã®ã§ã¯ãããŸããã ããªãããŠãã³ãŒãããšã³ã³ãŒãã£ã³ã°ãªã©ã«ããªãé·ããŠãããšä¿¡ããŠãããªãããã®èšäºã¯ã»ãšãã©ãŸãã¯ãŸã£ãã圹ã«ç«ããªããããããŸããã ãã ãããã€ããªããŒã¿ãšããã¹ãããŒã¿ïŒ ãã€ããªããŒã¿ãšããã¹ã ïŒã®éãããæåãšã³ã³ãŒããšã¯äœããç解ããŠããªã人ã¯ããªãããŸã ã ãã®èšäºãæžãããã®ã¯ãã®ãããªäººã ã®ããã§ãã äžè¬ã«ãè¡šé¢çãªèª¬æã«ãããããããããã€ãã®é£ããç¹ã«è§ŠããŠããŸããã詳现ãªèª¬æãè¡åã¬ã€ããæäŸããã®ã§ã¯ãªããèªè ãèªåã®ååšãç解ã§ããããã«ããããã«ããããããã«è¡ããŸããã
è³æº
以äžã®ãªã³ã¯ã¯ãå°ãªããšããã®èšäºãšåãããã䟿å©ã§ããããããã£ãšäŸ¿å©ã§ãã ç§èªèº«ã¯ããã®èšäºãæžããšãã«ãããã䜿çšããŸããã æçšã§é«å質ã®è³æããããããããŸãããã®èšäºã§äžæ£ç¢ºãªç¹ã«æ°ã¥ããå Žåããããã®ãªãœãŒã¹ã¯ããæ£ç¢ºã§ãªããã°ãªããŸããã
- Unicodeã³ã³ãœãŒã·ã¢ã ã®å ¬åŒãŠã§ããµã€ã ã ãã¹ãŠã®è³ªåã«å¯Ÿããåçãå«ããUnicodeæ å ±ã®æãå®å šã§æ£ç¢ºãªãœãŒã¹ïŒãã ãããµã€ãã§æçšãªæ å ±ãæ¢ãå¿ èŠããããŸãïŒã 以äžã®ãªã³ã¯ã®äžéšã¯ããã®ãµã€ãã«ã€ãªãã£ãŠããŸãã
- Unicodeçšèªé æåãšã³ã³ãŒãã£ã³ã°ãªã©ã®è°è«ã§äœ¿çšãããå€ãã®çšèªã®ç°¡åãªè§£éãå«ãèŸæžã
- Unicode FAQ ã°ã«ãŒãã§é åžãããäœçŸãã®äžè¬çãªè³ªåãžã®åçã
- Unix / Linux UTF-8 FAQ ã ååããå€æããŠããã®ãªã³ã¯ãç¡èŠããªãã§ãã ãããããšãUnix / Linuxã®åéã§ãªããŠããã»ãšãã©ã®æ å ±ã¯.NETã«éåžžã«é¢é£ããŠããŸãã
- Unicodeæåãšã³ã³ãŒãã¢ãã« ã ãæåãšã³ã³ãŒãã£ã³ã°ã¹ããŒã ããªã©ã®çšèªã®æ£ç¢ºãªè§£éã«é¢ãã詳现æ å ±ãæäŸããŸãã
- ãžã§ãšã«ã»ã¹ãã«ã¹ããŒã ãã¹ãŠã®ãœãããŠã§ã¢éçºè ãUnicodeããã³æåã»ããã«ã€ããŠç¥ã£ãŠããå¿ èŠãããå¿ é ã®æå°å€ïŒèšãèš³ã¯èš±å¯ãããŸããïŒ ã ããã«ãã䌌ãŠãããã.NETã«éç¹ã眮ããŠããªãèšäºã ïŒ ãã·ã¢èªãžã®ç¿»èš³ãHabré ããŒã1 ã ããŒã2ã®ç¿»èš³ïŒ
- Unicodeã®åªããã«ã€ã㊠ã èªã䟡å€ãããå¥ã®å ¥éèšäºã
ãã€ããªããŒã¿ãšããã¹ãããŒã¿ã¯2ã€ã®ç°ãªããã®ã§ãã
ææ°ã®ããã°ã©ãã³ã°èšèªïŒå€ãèšèªãªã©ïŒã®ã»ãšãã©ã¯ããã€ããªïŒãã€ããªïŒã³ã³ãã³ããšã·ã³ããªãã¯ïŒãŸãã¯ããã¹ãïŒã³ã³ãã³ãã®éã«æ確ãªç·ãåŒããŸãã ãã®éãã¯æ¬èœçãªã¬ãã«ã§ç解ãããŸãããããã§ãå®çŸ©ãè¡ããŸãã
ãã€ããªïŒãã€ããªïŒããŒã¿ã¯ãèªç¶ãªæå³ã解éãä»å ãããŠããªãäžé£ã®ãªã¯ããã ïŒ8ãããã§æ§æããããªã¯ãããïŒã§ãã ãããŠãããšãå®è¡å¯èœãã¡ã€ã«ãã°ã©ãã£ãã¯ã€ã¡ãŒãžã®ãããª1ã€ãŸãã¯å¥ã®ãªã¯ãããã»ããã®å€éšã解éããããå Žåã§ããããŒã¿èªäœã¯ãªã¯ãããã»ããã«ãããŸããã ããã«ãããªã¯ãããããšããçšèªã®ä»£ããã«ãããã€ããã䜿çšããŸãããæ£ç¢ºã«ã¯ããã¹ãŠã®ãã€ãããªã¯ãããã§ã¯ãããŸããã ããšãã°ã9ããããã€ãã®ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ããããŸããã ãã ãããã®ã³ã³ããã¹ãã§ã¯ããã®ãããªè©³çŽ°ã¯å®éã«ã¯å¿ èŠãªãããã以éã§ã¯ããã€ãããšããçšèªã¯æ£ç¢ºã«8ããããã€ããæå³ããŸãã
æåïŒããã¹ãïŒããŒã¿ã¯äžé£ã®æåã§ãã
Unicodeçšèªéã§ã¯ãã·ã³ãã«ã次ã®ããã«å®çŸ©ããŠããŸãã
- ã»ãã³ãã£ãã¯ãªæå³ãå«ãèšè¿°èšèªã®æå°ã³ã³ããŒãã³ãã ç¹æ®ãªåœ¢åŒïŒ ã°ãªããªã©ïŒãšã¯å¯Ÿç §çã«ãæœè±¡çãªæå³ã圢åŒã瀺ããŸãã ã³ãŒãè¡šã§ã¯ãèªè ãæåãç解ããããã«ãæåã®èŠèŠçè¡šçŸã®ããã€ãã®åœ¢åŒãéåžžã«éèŠã§ãã
- æœè±¡èšå·ã®å矩èªïŒã»ã¯ã·ã§ã³3.3ãæåãšã³ãŒãè¡šçŸã®å®çŸ©D3ãåç §ïŒã
- Unicodeã³ãŒãã£ã³ã°ã·ã¹ãã ã§ã®ã³ãŒãã£ã³ã°ã®åºæ¬åäœã
- äžåœèµ·æºã®è¡šææåã§æžãããèŠçŽ ã®è±èªåã
ãã®å®çŸ©ã¯åœ¹ã«ç«ã€ãããããŸããããã»ãšãã©ã®å Žåã倧ããªæåãAããæ°åã1ããªã©ã瀺ãç¹å®ã®èŠçŽ ã®ãããªãã®ãšããŠãã·ã³ãã«ã®çŽæçãªç解ã䜿çšã§ããŸãã ãã ããä»ã®ãã£ã©ã¯ã¿ãŒã¯ããã»ã©çŽæçã§ã¯ãããŸããã ãããã«ã¯ãä»ã®æåãå€æŽããããã«èšèšãããæåã®å€æŽïŒããšãã°ãæ¥æ§ã¹ãã¬ã¹ã æ¥æ§ ïŒã å¶åŸ¡æå ïŒããšãã°ãæ¹è¡ïŒãæžåŒèšå®æåïŒé衚瀺ã§ãããä»ã®æåã«åœ±é¿ããŸãïŒãå«ãŸããŸãã ããã¹ãããŒã¿ã¯æåã»ããã§ããããããäž»ãªãã®ã§ãã
æ®å¿µãªãããæè¿ã§ã¯ããã€ããªããŒã¿ãšããã¹ãããŒã¿ã®éãã¯éåžžã«ãŒãããŠããããããŸãã§ããã ããšãã°ãCããã°ã©ãã®å Žåãã»ãšãã©ã®å Žåãããã€ãããšãæåããšããçšèªã¯åãããšãæå³ããŠããŸããã .NETãJavaã®ãããªè¿ä»£çãªãã©ãããã©ãŒã ã§ã¯ãæåãšãã€ãã®åºå¥ãæ確ã§ãããå ¥å/åºåã©ã€ãã©ãªã§ä¿®æ£ãããŠãããããå€ãç¿æ £ã¯ãã€ãã¹ã®çµæãããããå¯èœæ§ããããŸãïŒããšãã°ãæååãèªã¿åã£ãŠãã€ããªãã¡ã€ã«ã®å 容ãã³ããŒããããšããå ŽåããããŸãïŒãã®ãã¡ã€ã«ã®å 容ãæªããŸãïŒã
ã§ã¯ãUnicodeã¯äœã®ããã«ããã®ã§ããããïŒ
Unicodeã³ã³ãœãŒã·ã¢ã ã¯ããã€ããªããããã¹ããžã®å€æãããã³ãã®éã®å€æïŒãããããã³ãŒãããã³ãšã³ã³ãŒããšåŒã°ããïŒãå«ããæåããŒã¿ã®åŠçã®æšæºåãè©Šã¿ãŠããŸãã ããã«ãåãããšãè¡ãISOæšæºã®ã»ããïŒããŸããŸãªããŒãžã§ã³ã§10646ïŒããããŸãã UnicodeãšISO 10646ã¯ã»ãŒå®å šã«äºææ§ããããããåããã®ãšèŠãªãããšãã§ããŸãã ïŒçè«çã«ã¯ãISO 10646ã¯ããåºãæœåšçãªæåã»ãããå®çŸ©ããŠããŸããããããåé¡ã«ãªãããšã¯ãŸããããŸãããïŒ.NETãJavaãå«ãææ°ã®ããã°ã©ãã³ã°èšèªãšãã©ãããã©ãŒã ã®ã»ãšãã©ã¯Unicodeã䜿çšããŠæåãè¡šããŸãã
Unicodeã¯ããšããã以äžãå®çŸ©ããŸãã
- æœè±¡æåã®ã¬ããŒããªãŒ ïŒ æœè±¡æåã¬ããŒããªãŒ ïŒ -Unicodeã§ãµããŒããããŠãããã¹ãŠã®æåã®ã»ããã
- æåã³ãŒãã®ã»ããïŒ ã³ãŒãåæåã»ãã ïŒ-ã¬ããŒããªãŒããã®åæåãšãã³ãŒããã€ã³ããšåŒã°ããéè² ã®æŽæ°ãšã®ãã€ã³ãã£ã³ã°ãå«ãŸããŠããŸãã
- äžéšã®æåãšã³ã³ãŒãã£ã³ã°åœ¢åŒ âã³ãŒããã€ã³ããšãã³ãŒããŠããããã®ã·ãŒã±ã³ã¹ãšã®å¯Ÿå¿ã決å®ããŸãïŒåã«ãä»»æã®é·ãã®åäžã®æŽæ°ãšããŠè¡šãããã³ãŒããã€ã³ããšãã®çªå·ããšã³ã³ãŒããããã€ãã®ã°ã«ãŒããšã®å¯Ÿå¿ïŒã
- äžéšã®æåãšã³ã³ãŒãã£ã³ã°ã¹ããŒã -ã³ãŒããŠãããã®ã»ãããšã·ãªã¢ã«åããããã€ãã·ãŒã±ã³ã¹éã®å¯Ÿå¿ã決å®ããŸãã
æåãšã³ã³ãŒã圢åŒãšæåãšã³ã³ãŒãæ¹åŒã®éãã¯éåžžã«åŸ®åŠã§ããã ãšã³ãã£ã¢ã³ãã¹ã®é åºãèæ ®ãããŸãã ïŒããšãã°ãUCS-2ãšã³ã³ãŒãã£ã³ã°ã§ã¯ãã³ãŒããŠããã0xC2 0xA9ã®ã·ãŒã±ã³ã¹ã0xC2 0xA9ãŸãã¯0xA9 0xC2ãšããŠã·ãªã¢ã«åã§ããŸãããããæåãšã³ã³ãŒãã£ã³ã°ã¹ããŒã ã«ãã£ãŠæ±ºãŸããŸããïŒ
æœè±¡Unicodeæåã®ã¬ããŒããªãŒã«ã¯ãçè«äžãæ倧1114112æåãå«ããããšãã§ããŸãããå€ãã¯ãã§ã«äœ¿çšäžå¯ãšããŠäºçŽãããŠãããæ®ãã®æåã¯ã»ãšãã©å²ãåœãŠãããŸããã åæåã¯ã0ãã1114111ïŒ0x10FFFFïŒãŸã§ã®è² ã§ãªãæŽæ°ã§ãšã³ã³ãŒããããŸãã ããšãã°ã倧æåã®Aã¯10é²æ°65ã§ãšã³ã³ãŒããããŸããæ°å¹Žåããã¹ãŠã®æåã0ã2 16 -1ã®ç¯å²ã«åãŸããšèããããŠããããã2ãã€ãã䜿çšããŠä»»æã®æåãè¡šçŸã§ããŸãã æ®å¿µãªãããæéãçµã€ã«ã€ããŠããå€ãã®ãã£ã©ã¯ã¿ãŒãå¿ èŠã«ãªããããããç»å Žäººç©ã®åºçŸã«ã€ãªãããŸããã ããµãã²ãŒããã¢ãïŒ ãµãã²ãŒãã㢠ïŒã ãããã«ãã£ãŠããã¹ãŠãïŒå°ãªããšãç§ã«ãšã£ãŠã¯ïŒã¯ããã«è€éã«ãªã£ãŠããããããã®èšäºã®ã»ãšãã©ã§ã¯ããããæ±ããŸããã ãå°é£ãªç¬éãã®ã»ã¯ã·ã§ã³ã§ç°¡åã«èª¬æããŸãã
.NETã¯äœãæäŸããŸããïŒ
äžèšã®ãã¹ãŠãå¥åŠã«èŠããŠãå¿é ããªãã§ãã ããã äžèšã®éãã¯ç¥ã£ãŠããã¹ãã§ãããå®éããããã¯ãã°ãã°åé¢ã«åºãããšã¯ãããŸããã ã»ãšãã©ã®ã¿ã¹ã¯ã¯ãç¹å®ã®ãã€ãã»ãããããã¹ãã«ããŸãã¯ãã®éã«å€æããããšãäžå¿ã«å±éããå¯èœæ§ããããŸãã ãã®ãããªç¶æ³ã§ã¯ã System.Charæ§é äœïŒCïŒã§ã¯å¥å
char
ã§ç¥ãããŠããŸã ïŒã System.Stringã¯ã©ã¹ïŒCïŒã§ã¯
string
ïŒãããã³System.Text.Encodingã¯ã©ã¹ã䜿çšããŸãã
Char
æ§é ã¯ãCïŒã®æãåºæ¬çãªã¿ã€ãã®æåã§ã
Char
1ã€ã®ã€ã³ã¹ã¿ã³ã¹ã¯1ã€ã®Unicodeæåãè¡šãã2ãã€ãã®ã¡ã¢ãªãå æããŸããã€ãŸãã0ã65535ã®ç¯å²ã®ä»»æã®å€ãåãããšãã§ããŸãã ãã®ç¯å²ã®ãã¹ãŠã®æ°åãæå¹ãªUnicodeæåã§ã¯ãªãããšã«æ³šæããŠãã ããã
String
ã¯ã©ã¹ã¯åºæ¬çã«äžé£ã®æåã§ãã ããã¯äžå€ã§ããã€ãŸããæååã®ã€ã³ã¹ã¿ã³ã¹ãäœæããåŸããããå€æŽããããšã¯ã§ããŸããïŒã€ã³ã¹ã¿ã³ã¹ïŒ
String
ã¯ã©ã¹ã®ããŸããŸãªã¡ãœããã¯ãå 容ãå€æŽããããã«èŠããŸãããå®éã«ã¯æ°ããæååãäœæããŠè¿ããŸãã
System.Text.Encoding
ã¯ã©ã¹ã¯ããã€ãã®é åãæåã®é åãŸãã¯æååã«ããŸãã¯ãã®éã«å€æããæ段ãæäŸããŸãã ãã®ã¯ã©ã¹ã¯æœè±¡ã§ãã ãã®ããŸããŸãªå®è£ ã¯äž¡æ¹ãšã.NETã§è¡šããããŠãŒã¶ãŒèªèº«ãäœæã§ããŸãã ïŒ
System.Text.Encoding
å®è£ ãäœæããã¿ã¹ã¯ã¯ããã£ãã«çºçããŸãããã»ãšãã©ã®å Žåã.NETã®äžéšã§ããã¯ã©ã¹ãååã«ãããŸããïŒ
Encoding
ã«ãããåŒã³åºãéã§ç¶æ ãåŠçãããšã³ã³ãŒããŒãšãã³ãŒããŒãåå¥ã«æå®ã§ããŸãã ããã¯ãã¹ããªãŒã ããåä¿¡ãããã¹ãŠã®ãã€ããæåã«æ£ãããã³ãŒãã§ããªãå Žåã®ãã«ããã€ãæåãšã³ã³ãŒãã¹ããŒã ã«å¿ èŠã§ãã ããšãã°ãUTF-8ãã³ãŒããŒãå ¥åãšããŠ2ãã€ã0x41 0xC2ãåä¿¡ããå Žåãæåã®æåïŒå€§æåã®ãAãïŒã®ã¿ãè¿ãããšãã§ããŸããã2çªç®ã®æåã決å®ããã«ã¯3çªç®ã®ãã€ããå¿ èŠã§ãã
çµã¿èŸŒã¿ã®ãšã³ã³ãŒãã¹ããŒã
.NETã¯ã©ã¹ã©ã€ãã©ãªã«ã¯ãããŸããŸãªãšã³ã³ãŒãã¹ããŒã ãå«ãŸããŠããŸãã 以äžã¯ããããã®ã¹ããŒã ãšãã®äœ¿çšæ¹æ³ã®èª¬æã§ãã
ã¢ã¹ããŒ
ASCIIã¯æãäžè¬çãªæåãšã³ã³ãŒãã£ã³ã°ã®1ã€ã§ãããåæã«æã誀解ãããŠããæåãšã³ã³ãŒãã£ã³ã°ã®1ã€ã§ããããŸãã äžè¬çãªèª€è§£ã«åããŠãASCIIã¯8ãããã§ã¯ãªã7ãããã®ãšã³ã³ãŒãã§ãã127ãè¶ ããã³ãŒãïŒã³ãŒããã€ã³ãïŒã®æåã¯ååšããŸããã ããšãã°ããASCII 154ããšããã³ãŒãã䜿çšããŠãããšèª°ããèšã£ãå Žåããã®äººã¯èªåãäœãããŠäœãèšã£ãŠããã®ãç解ããŠããªããšæ³å®ã§ããŸãã 確ãã«ãèšââãèš³ãšããŠã圌ã¯ãæ¡åŒµASCIIãïŒ æ¡åŒµASCII ïŒã«ã€ããŠäœããèšããããããŸããã ãã®ããããæ¡åŒµASCIIããšåŒã°ããã¹ããŒã ã¯ãããŸããã ASCIIã®ã¹ãŒããŒã»ããã§ããå€ãã®8ããããšã³ã³ãŒãã¹ããŒã ãããããæ¡åŒµASCIIããšããçšèªãæã ããããæãããã«äœ¿çšãããŸãããããã¯å®å šã«æ£ããããã§ã¯ãããŸããã åASCIIæåã®ã³ãŒããã€ã³ãã¯ãåæ§ã®Unicodeæåã®ã³ãŒããã€ã³ããšäžèŽããŸããã€ãŸããå°æåã®ã©ãã³æåãxãã®ASCIIæåãšåãæåã®Unicodeæåã¯ãåãæ°å-120ïŒ16é²è¡šèšã®0x78ïŒã§ç€ºãããŸãã ç§ã®æèŠã§ã¯ã ASCIIEncoding .NETã¯ã©ã¹ïŒãã®ã€ã³ã¹ã¿ã³ã¹ã¯Encoding.ASCIIããããã£ãä»ããŠç°¡åã«ååŸã§ããŸãïŒã¯ãããã7ã®åŸã«ãã¹ãŠã®ããããããããããã ãã§ãšã³ã³ãŒããå®è¡ãããããå°ãå¥åŠã§ãã ããã¯ãããšãã°ãUnicodeæå0xB5ïŒããã€ã¯ããèšå·ã¯Âµ ïŒã¯ãASCIIã§ãšã³ã³ãŒããããUnicodeã«ãã³ãŒããããåŸã0x35æåïŒæ°åã5ãïŒã«å€ããããšãæå³ããŸãã ïŒä»£ããã«ãå ã®æåãASCIIã«ååšãã倱ãããããšã瀺ãç¹æ®æåã衚瀺ããããšããå§ãããŸããïŒ
UTF-8
UTF-8ã¯ãUnicodeæåãè¡šçŸããããã®é©åã§äžè¬çãªæ¹æ³ã§ãã åæåã¯ã1ãã4ãŸã§ã®ãã€ãã·ãŒã±ã³ã¹ã§ãšã³ã³ãŒããããŸãã ïŒã³ãŒããã€ã³ãã65536æªæºã®ãã¹ãŠã®æåã¯ã1ã2ããŸãã¯3ãã€ãã§ãšã³ã³ãŒããããŸãã.NETããµãã²ãŒããã¢ããšã³ã³ãŒãããæ¹æ³ã¯ãã¹ãããŠããŸããã1ã3ãã€ãã®2ã€ã®ã·ãŒã±ã³ã¹ãŸãã¯4ãã€ãã®1ã€ã®ã·ãŒã±ã³ã¹ã Unicodeæåã§ãããASCIIäºæã§ãããããASCIIæåã®ã·ãŒã±ã³ã¹ã¯å€æŽããã«UTF-8ã«ãã©ã³ã¹ã³ãŒããããŸãïŒã€ãŸããASCIIã®æåãè¡šããã€ãã®ã·ãŒã±ã³ã¹ãšUTF-8ã§åãæåãè¡šããã€ãã®ã·ãŒã±ã³ã¹åãã§ãïŒã ããã«ãæåããšã³ã³ãŒãããæåã®ãã€ãã¯ãåãæåããšã³ã³ãŒããããã€ããããã°ããã決å®ããã®ã«ååã§ãã UTF-8èªäœã¯ããã€ããªãŒããŒããŒã¯ïŒBOMïŒãå¿ èŠãšããŸããããããã¹ããUTF-8圢åŒã§ããããšã瀺ãæ¹æ³ãšããŠäœ¿çšã§ããŸãã BOMãå«ãUTF-8ããã¹ãã¯ãåžžã«3ãã€ãã®ã·ãŒã±ã³ã¹0xEF 0xBB 0xBFã§å§ãŸããŸãã .NETã§UTF-8ã§æååããšã³ã³ãŒãããã«ã¯ãåã«Encoding.UTF8ããããã£ã䜿çšããŸãã å®éãã»ãšãã©ã®å Žåããããè¡ãå¿ èŠãããããŸãããä»ã®ãšã³ã³ãŒãã£ã³ã°ãæ瀺çã«èšå®ãããŠããªãå Žåãå€ãã®ã¯ã©ã¹ïŒ StreamWriterãå«ãïŒã¯ããã©ã«ãã§UTF-8ã䜿çšããŸãã ïŒééããªããããã§ã¯Encoding.Defaultã¯é©çšãããŸãããããã¯å®å šã«ç°ãªããŸããïŒããã«ãããããããèªã¿ããããšç解ã®ããã ãã«ãã³ãŒãã§ãšã³ã³ãŒãã£ã³ã°ãåžžã«æ瀺çã«æå®ããããšããå§ãããŸãã
UTF-16ããã³UCS-2
UTF-16ã¯ã.NETãæåãåŠçããããã®åãªããšã³ã³ãŒãã£ã³ã°ã§ãã åæåã¯2ãã€ãã®ã·ãŒã±ã³ã¹ã§è¡šãããŸãã ãããã£ãŠããµãã²ãŒããã¢ã«ã¯4ãã€ããå¿ èŠã§ãã ãµãã²ãŒããã¢ã䜿çšããæ©èœã¯ãUTF-16ãšUCS-2ã®å¯äžã®éãã§ããUCS-2ïŒåã«UnicodeãšãåŒã°ããŸãïŒã¯ããµãã²ãŒããã¢ãèš±å¯ããã0ã65535ïŒ0ã0xFFFFïŒã®ç¯å²ã®æåãè¡šãããšãã§ããŸãã UTF-16ã¯ç°ãªããã€ãé ïŒãšã³ãã£ã¢ã³ïŒãæã€ããšãã§ããŸãïŒé«ããäœïŒ ããã°ãšã³ãã£ã¢ã³ ïŒãäœããé«ïŒ ãªãã«ãšã³ãã£ã¢ã³ ïŒããŸãã¯ãªãã·ã§ã³ã®BOMïŒ å°ãã®å Žåã¯0xFF 0xFEãšã³ãã£ã¢ã³ãããã°ãšã³ãã£ã¢ã³ã®å Žåã¯0xFE 0xFFïŒã .NETèªäœã§ã¯ãç§ã®ç¥ãéãããµãã²ãŒããã¢ã®åé¡ã¯ãã¹ã³ã¢ãªã³ã°ãããããµãã²ãŒããã¢ã®åæåã¯ç¬ç«ããã·ã³ãã«ãšèŠãªãããUCS-2ãšUTF-16ã®éã®äžçš®ã®ãã€ã³ã©ã€ãŒãŒã·ã§ã³ãã«ã€ãªãããŸãã ïŒUCS-2ãšUTF-16ã®æ£ç¢ºãªéãã¯ããµãã²ãŒããã¢ã®ããæ·±ãç解ã§ãããç§ã¯ãã®åŽé¢ã«ç²ŸéããŠããŸãããïŒããã°ãšã³ãã£ã¢ã³ãã¥ãŒã®UTF-16ã¯ã Encoding.BigEndianUnicodeããããã£ã䜿çšããŠååŸã§ããŸãããšã³ãã£ã¢ã³-Encoding.Unicodeã䜿çšããŸãã äž¡æ¹ã®ããããã£ã¯ã System.Text.UnicodeEncodingã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãè¿ããŸããããã¯ãããŸããŸãªã³ã³ã¹ãã©ã¯ã¿ãªãŒããŒããŒãã䜿çšããŠäœæããããšãã§ããŸããããã§ã¯ãBOMã䜿çšãããã©ãããããã³ãã€ããèšå®ããé åºãæå®ã§ããŸãã ç§ã¯ïŒããããã¹ãããŠããŸãããïŒãã€ããªã³ã³ãã³ãããã³ãŒããããšããã³ã³ãã³ãã«ååšããBOMã¯ãšã³ã³ãŒããŒã§èšå®ããããã€ããªãŒããŒèšå®ããªãŒããŒã©ã€ããããããããã°ã©ããŒãã³ã³ãã³ãããã³ãŒãããŠãäœåãªãžã§ã¹ãã£ãŒãããªãã§ãã ãããã®ã³ã³ãã³ãå ã®ãã€ãé ããã³/ãŸãã¯BOMã®ååšã圌ã«ç¥ãããŠããªãå Žåã
UTF-7
ç§ã®çµéšããå€æãããšãUTF-7ã¯ã»ãšãã©äœ¿çšãããŸããããUnicodeïŒããããæåã®65535æåã®ã¿ïŒãASCIIæåïŒãã€ãã§ã¯ãããŸããïŒïŒã«å€æã§ããŸãã ããã¯ãã¡ãŒã«ã²ãŒããŠã§ã€ãASCIIæåã®ã¿ããŸãã¯ASCIIã®ãµãã»ããïŒ EBCDICãšã³ã³ãŒãã£ã³ã°ãªã©ïŒã®ã¿ããµããŒãããç¶æ³ã§é»åã¡ãŒã«ã䜿çšããå Žåã«åœ¹ç«ã¡ãŸãã UTF-7ã®è©³çŽ°ã«äžåºŠãç»ã£ãããšããªãã®ã§ããããã説æããã€ããã¯ãããŸããã UTF-7ã䜿çšããå¿ èŠãããå Žåã¯ãããããååãªç¥èããããŸããUTF-7ã䜿çšãã絶察çãªå¿ èŠæ§ããªãå Žåã¯ã䜿çšããªãããšããå§ãããŸãã UTF-7ã§ãšã³ã³ãŒãããããã®ã¯ã©ã¹ã€ã³ã¹ã¿ã³ã¹ã¯ã Encoding.UTF7ããããã£ã䜿çšããŠååŸã§ããŸãã
Windows / ANSIã³ãŒãããŒãž
Windowsã³ãŒãããŒãžã¯éåžžãããããæ倧256ãŸãã¯65,536æåããšã³ã³ãŒããã1ãŸãã¯2ãã€ãã®æåã»ããã§ãã åã³ãŒãããŒãžã«ã¯ç¬èªã®çªå·ããããæ¢ç¥ã®çªå·ãæã€ã³ãŒãããŒãžã®ãšã³ã³ãŒããŒã¯ãéçã¡ãœããEncoding.GetEncodingïŒInt32ïŒã䜿çšããŠååŸã§ããŸãã ã»ãšãã©ã®å Žåãã³ãŒãããŒãžã¯ãã ããã©ã«ãã³ãŒãããŒãž ãã«ä¿åãããããšãå€ãå€ãããŒã¿ã®æäœã«åœ¹ç«ã¡ãŸã ã ããã©ã«ãã®ã³ãŒãããŒãžã®ãšã³ã³ãŒããŒã¯ã Encoding.Defaultããããã£ã䜿çšããŠååŸã§ããŸãã ç¹°ãè¿ããŸãããå¯èœãªéãã³ãŒãããŒãžã䜿çšããªãã§ãã ããã 詳现ã«ã€ããŠã¯ãMSDNã«ãåãåãããã ããã
ISO-8859-1ïŒã©ãã³1ïŒ
ASCIIãšåæ§ã«ãLatin-1ã³ãŒãããŒãžã®åæåã«ã¯ãUnicodeã®åãæåã®ã³ãŒããšåãã³ãŒãããããŸãã Latin-1ã«ã¯ãã³ãŒãã128ãã159ã®äžæãªæåã®ãç©Žããããã®ãââãLatin-1ã«Unicodeãšåãå¶åŸ¡æåãå«ãŸããŠããã®ããæ°ã«ããããšã¯ãããŸããã§ããã ïŒç§ã¯ãç©Žãã®ã¢ã€ãã¢ã«åŸãå§ããŸãããããŠã£ãããã£ã¢ã¯ç§ã«åæããŸããã§ããã®ã§ãç§ã¯ãŸã èããŠããŸãïŒ ãŠã£ãããã£ã¢ã®èšäºã¯æããã«ã®ã£ããã®ååšã瀺ããŠãããããèè ã®èãã¯æ確ã§ã¯ãããŸããããããããå ã®èšäºãæžããŠããæç¹ã§ã Wikipediaã®èšäºã¯ç°ãªã£ãŠããŸãã-çŽtranslã ïŒïŒLatin-1ã®ã³ãŒãããŒãžçªå·ã¯28591ãªã®ã§ããšã³ã³ãŒããŒãååŸããã«ã¯
Encoding.GetEncoding(28591)
ã¡ãœããã䜿çšããŸãã
ã¹ããªãŒã ããªãŒããŒãã©ã€ã¿ãŒ
ã¹ããªãŒã ã¯æ¬è³ªçã«ãã€ããªã§ããããã€ããèªã¿æžãããŸãã æååãåãåããã®ã¯ãã¹ãŠãç¹å®ã®æ¹æ³ã§æååããã€ãã«å€æããå¿ èŠããããŸãããã®å€æã¯æåããå Žåãããªãå ŽåããããŸãã ããã¹ããèªã¿æžãããããã®ã¹ããªãŒã ã«çžåœãããã®ã¯ãããããæœè±¡ã¯ã©ã¹System.IO.TextReaderãšSystem.IO.TextWriterã§ãã æ¢ã«ã¹ããªãŒã ã®æºåãã§ããŠããå Žåã¯ã System.IO.StreamReaderã¯ã©ã¹ïŒ
TextReader
ãçŽæ¥ç¶æ¿ããïŒãèªã¿åãã«äœ¿çšãã System.IO.StreamWriter ïŒ
TextWriter
ãçŽæ¥ç¶æ¿ããïŒãæžã蟌ã¿ã«äœ¿çšããŠãã¹ããªãŒã ããããã®ã¯ã©ã¹ã®ã³ã³ã¹ãã©ã¯ã¿ãŒã«æž¡ãããã®ããã«ã³ãŒãã£ã³ã°ã§ããŸãå¿ èŠã«å¿ããŠã ãšã³ã³ãŒããæ瀺çã«æå®ããªãå Žåãããã©ã«ãã§UTF-8ã䜿çšãããŸãã 以äžã¯ããã¡ã€ã«ãUTF-8ããUCS-2ã«å€æããã³ãŒãã®äŸã§ãã
using System; using System.IO; using System.Text; public class FileConverter { const int BufferSize = 8096; public static void Main(string[] args) { if (args.Length != 2) { Console.WriteLine ("Usage: FileConverter <input file> <output file>"); return; } String inputFile = args[0]; String outputFile = args[1]; // TextReader using (TextReader input = new StreamReader (new FileStream (inputFile, FileMode.Open), Encoding.UTF8)) { // TextWriter using (TextWriter output = new StreamWriter (new FileStream (outputFile, FileMode.Create), Encoding.Unicode)) { // char[] buffer = new char[BufferSize]; int len; // while ( (len = input.Read (buffer, 0, BufferSize)) > 0) { output.Write (buffer, 0, len); } } } } }
ãã®ã³ãŒãã¯ãã¹ããªãŒã ãåãå ¥ãã
TextReader
ããã³
TextWriter
ã䜿çšããããšã«æ³šæããŠãã ããã å ¥åãšããŠãã¡ã€ã«ãã¹ãåãå ¥ããã³ã³ã¹ãã©ã¯ã¿ãªãŒããŒããŒãã¯ä»ã«ãããããã
FileStream
ãæåã§éãå¿ èŠã¯ãããŸããã ããã¯äŸãšããŠã®ã¿è¡ããŸããã ãããã¡ãŒãµã€ãºãšBOMãå®çŸ©ããå¿ èŠæ§ãåãå ¥ããã³ã³ã¹ãã©ã¯ã¿ãŒãªãŒããŒããŒãããããŸããäžè¬çã«ã¯ãããã¥ã¡ã³ããã芧ãã ããã æåŸã«ã.NET 2.0以éã䜿çšããŠããå Žåã¯ãéçã¯ã©ã¹System.IO.Fileã確èªãããšäŸ¿å©ã§ãããã®ã¯ã©ã¹ã«ã¯ããšã³ã³ãŒããæäœã§ãã䟿å©ãªã¡ãœãããå€æ°å«ãŸããŠããŸãã
é£ããç¬é
ããŠããããã¯ãŠãã³ãŒãã®åºæ¬ã«ãããŸããã ä»ã«ãå€ãã®ãã¥ã¢ã³ã¹ããããŸããããã®ãã¡ã®ããã€ãã¯ãã§ã«ç€ºåããŠããŸãããããšãããã圌ãã«èµ·ãããªããšä¿¡ããŠããŠãã人ã ã¯ãããã«ã€ããŠç¥ã£ãŠããã¹ãã ãšæããŸãã äžè¬çãªæ¹æ³è«ãã¬ã€ãã©ã€ã³ã¯æäŸããŠããŸãããåé¡ã®å¯èœæ§ã«å¯Ÿããèªèãé«ããããšããŠããŸãã 以äžã¯ãªã¹ãã§ãããå®å šãªãã®ã§ã¯ãããŸããã 説æããåé¡ãšå°é£ã®ã»ãšãã©ã¯ãUnicodeã³ã³ãœãŒã·ã¢ã ã®é害ã§ã¯ãªãããšãç解ããããšãéèŠã§ãã æ¥ä»ãæéãããã³åœéåã®åé¡ã®å Žåãšåæ§ã«ãããã¯äººé¡ã®ãã¡ãªãããã§ãããããèªäœãæéã®çµéãšãšãã«å€ãã®æ ¹æ¬çã«è€éãªåé¡ãçã¿åºããŸããã
æåäŸåã®æ€çŽ¢ã䞊ã¹æ¿ããªã©ã
ãããã®åé¡ã¯ã.NETã®æååã«é¢ããç§ã®èšäºïŒ ãªãªãžãã« ã 翻蚳 ïŒã§èª¬æãããŠããŸãã
ãµãã²ãŒããã¢
Unicodeã«ã¯65536åãè¶ ããæåãå«ãŸããŠãããããããããã¹ãŠã2ãã€ãã§å容ããããšã¯ã§ããŸããã ããã¯ã
Char
æ§é ã®åäžã®ã€ã³ã¹ã¿ã³ã¹ããã¹ãŠã®å¯èœãªæåãåãå ¥ããããšãã§ããªãããšãæå³ããŸãã UTF-16ïŒããã³.NETïŒã¯ããµãã²ãŒããã¢ã䜿çšããŠãã®åé¡ã解決ããŸãããããã¯2ã€ã®16ãããå€ã§ãããåå€ã®ç¯å²ã¯0xD800ã0xDFFFã§ãã ã€ãŸãã2ã€ã®ãã·ã³ãã«ã®ã¿ã€ããã1ã€ã®ãå®éã®ãã·ã³ãã«ã圢æããŸãã ïŒUCS-4ãšUTF-32ã¯ã䜿çšå¯èœãªå€ã®ç¯å²ãåºããšããäºå®ã«ããããã®åé¡ãå®å šã«è§£æ±ºããŸããåæåã¯4ãã€ãã§ãããã¯ãã¹ãŠã®äººã«ãšã£ãŠååã§ããïŒããã¯ãæååãã10æåã§æ§æãããå®éã«ã¯10ã5æåã®ãå®éã®ãUnicodeæåãå«ããããšãã§ããŸãã 幞ããªããšã«ãã»ãšãã©ã®ã¢ããªã±ãŒã·ã§ã³ã¯ç§åŠçãŸãã¯æ°åŠçãªè¡šèšãšã«ãŒã³èšå·ã䜿çšããŠããŸããããã®ãããããŸãå¿é ããå¿ èŠã¯ãããŸããã
修食æå
ãã¹ãŠã®Unicodeæåãç»é¢ãŸãã¯çŽã«ã¢ã€ã³ã³/ç»åãšããŠè¡šç€ºãããããã§ã¯ãããŸããã äžç·ä»ãïŒã¢ã¯ã»ã³ãä»ãïŒæåã¯ãä»ã®2ã€ã®æåãšããŠè¡šãããšãã§ããŸããéåžžã®äžç·ä»ãæåãšãããã«ç¶ãäžç·ïŒ çµåæåãšåŒã°ããŸãïŒã äžéšã®ã°ã©ãã£ã«ã«ã€ã³ã¿ãŒãã§ã€ã¹ã¯æåã®å€æŽããµããŒãããŠããŸãããäžéšã¯ãµããŒãããŠããªããããã¢ããªã±ãŒã·ã§ã³ã¯ã©ã®ãããªä»®å®ãè¡ããã«äŸåããŸãã
æ£èŠå
ãã£ã©ã¯ã¿ãŒã®å€æŽãªã©ã®çç±ããããããæå³ã§åäžã®ãã£ã©ã¯ã¿ãŒãè¡šãæ¹æ³ã¯ããã€ããããŸãã ããšãã°ãã¢ã¯ã»ã³ãä»ãã®æåãáãã¯ãã¢ã¯ã»ã³ããªãã®1ã€ã®èšå·ãaããšããã«ç¶ãã¢ã¯ã»ã³ãã®ä¿®é£Ÿæåã§è¡šãããšãã§ããã¢ã¯ã»ã³ãä»ãã®å®ææåãaããè¡šã1ã€ã®èšå·ã§ã®ã¿è¡šãããšãã§ããŸãã æåã·ãŒã±ã³ã¹ã¯ãå¯èœãªéãå€æŽæåã䜿çšããããã«æ£èŠåããããšãã§ããŸãããŸãã¯ããã®éãåæ§ã§ããåäžã®æåã«çœ®ãæããããšãã§ããå Žæã§ã¯äœ¿çšããŸããã ã¢ããªã±ãŒã·ã§ã³ã¯ãã¢ã¯ã»ã³ãä»ãã®æåãáããå«ã2è¡ãæ€èšããŸããã1è¡ã¯2æåã§è¡šãã2è¡ç®ã¯çããããŸãã¯ç°ãªããšèŠãªãã¹ãã§ããïŒ ãœãŒãã¯ã©ãã§ããïŒ ããªãã䜿çšãããµãŒãããŒãã£ã®ã³ã³ããŒãã³ããšã©ã€ãã©ãªã¯ãæååã®æ£èŠåãè¡ããŸããïŒäžè¬çã«ããã®ãããªãã¥ã¢ã³ã¹ã¯èæ ®ãããŸããïŒ ãããã®è³ªåã«çããŠãã ããã
Unicodeã®åé¡ã®ãããã°
ãã®ã»ã¯ã·ã§ã³ïŒ ãªãªãžãã«ã¯å¥ã®èšäºã§ã -çŽPer ïŒéåžžã«ç¹å®ã®ç¶æ³ã§äœããã¹ããã説æããŸãã ã€ãŸãã1ã€ã®å ŽæïŒéåžžã¯ããŒã¿ããŒã¹å ïŒã«ããã€ãã®ã·ã³ããªãã¯ããŒã¿ïŒéåžžã¯ããŒã¿ããŒã¹å ïŒãããããããã¯ç°ãªãã¹ããã/ã¬ã€ã€ãŒ/ã³ã³ããŒãã³ããééãããŠãŒã¶ãŒïŒéåžžã¯WebããŒãžïŒã«è¡šç€ºãããŸãã ãŸããæ®å¿µãªãããäžéšã®æåãæ£ãã衚瀺ãããŸããïŒ ã¯ã©ãã¯ãã㯠ïŒã ããã¹ãããŒã¿ãééããå€ãã®æé ã«åºã¥ããŠãå€ãã®å Žæã§åé¡ãçºçããå¯èœæ§ããããŸãã ãã®ããŒãžã¯ãäœãã©ãã§ãå£ããŠãããããç°¡åãã€ç¢ºå®ã«èŠã€ããã®ã«åœ¹ç«ã¡ãŸãã
ã¹ããã1ïŒUnicodeã®åºæ¬ãç解ãã
ç°¡åã«èšãã°ãèšäºã®æ¬æãèªãã§ãã ããã ãŸããèšäºã®åé ã«èšèŒãããŠãããªã³ã¯ã«æ³šæãæãããšãã§ããŸãã äºå®ã¯ãåºæ¬çãªç¥èããªããã°ãã³ãšåŒµããšããããšã§ãã
ã¹ããã2ïŒçºçããå¯èœæ§ã®ããå€æãç¹å®ãã
ãã¹ãŠãå£ããå¯èœæ§ã®ããå Žæãç解ã§ããã°ããã®ã»ã¯ã·ã§ã³/ã¹ãããã¯ç°¡åã«åé¢ã§ããŸãã åæã«ãåé¡ã¯ãªããžããªããããã¹ããæœåºããã³å€æããããã»ã¹ã§ã¯ãªãããã§ã«ãç Žæãããããã¹ãããªããžããªã«ä»¥åã«å ¥åããããšããäºå®ã«ããããšã«çæããŠãã ããã ïŒããšãã°ãããã¢ããªã±ãŒã·ã§ã³ãããŒã¿ããŒã¹ãšã®éã§ããã¹ããèªã¿æžãããéã«ããã¹ããæªãããšãéå»ã«ãã®ãããªåé¡ãçºçããŸããããããªãã¯ãã¯ãå€æãšã©ãŒãéè€ããçžäºã«è£æ£ãããŠãããããåºåãããã¹ãã¯æ£ããããšãå€æããŸãããäžè¬ã«ãã¢ããªã±ãŒã·ã§ã³ã¯æ£åžžã«æ©èœããŸãããã觊ããå Žåããã¹ãŠã厩ããŸãããïŒããã¹ãããå°ç¡ãã«ãããã¢ã¯ã·ã§ã³ã«ã¯ãããŒã¿ããŒã¹ããã®ååŸããã¡ã€ã«ããã®èªã¿åããWebæ¥ç¶ãä»ãã転éãç»é¢äžã®ããã¹ãã®è¡šç€ºãå«ãŸããŸã
ã¹ããã3ïŒå段éã§ããŒã¿ã確èªãã
æåã®ã«ãŒã«ïŒæåããŒã¿ãäžé£ã®ã°ãªããšããŠèšé²ãããã®ïŒã€ãŸããæšæºã®æåã¢ã€ã³ã³ïŒãä¿¡é Œããªãã§ãã ããã 代ããã«ããã€ãåäœã®æåã³ãŒãã®ã»ãããšããŠããŒã¿ãèšé²ããå¿ èŠããããŸãã ããšãã°ããhelloããšããåèªãå«ãè¡ãããå Žåãã0068 0065 006C 006C 006Fããšè¡šç€ºãããŸãã ïŒ16é²ã³ãŒãã䜿çšãããšãã³ãŒãããŒãã«ã«å¯ŸããŠæåãç°¡åã«ãã§ãã¯ã§ããŸããïŒãããè¡ãã«ã¯ãæååå ã®ãã¹ãŠã®æåã調ã¹ãåæåã®ã³ãŒãã衚瀺ããå¿ èŠããããŸãã
static void DumpString (string value) { foreach (char c in value) { Console.Write("{0:x4} ", (int)c); } Console.WriteLine(); }
ç¬èªã®ãã®ã³ã°æ¹æ³ã¯ç°å¢ã«ãã£ãŠç°ãªããŸããããã®åºç€ã¯ç§ãæå®ãããã®ãšãŸã£ããåãã§ããå¿ èŠããããŸãã æååã«é¢ããèšäºã§ãæåããŒã¿ã®ãããã°ãšãã°ã®ããé«åºŠãªæ¹æ³ã説æããŸããã
ç§ã®ã¢ã€ãã¢ã®æ¬è³ªã¯ããšã³ã³ãŒãã£ã³ã°ããã©ã³ããªã©ã«é¢ããããããçš®é¡ã®åé¡ãåãé€ãããšã§ãã ãã®ææ³ã¯ãç¹å®ã®Unicodeæåã䜿çšããå Žåã«åœ¹ç«ã¡ãŸããåçŽãªASCIIããã¹ãã®16é²ã³ãŒããæ£ããèšé²ã§ããªãå Žåã倧ããªåé¡ãçºçããŸãã
次ã®ã¹ãããã¯ã䜿çšã§ãããã¹ãã±ãŒã¹ãããããšã確èªããããšã§ããã§ããã°ã¢ããªã±ãŒã·ã§ã³ãã倱æãããããšãä¿èšŒãããŠãããœãŒã¹ããŒã¿ã®å°ããªã»ãããèŠã€ããæ£ããçµæãã©ãããã¹ãããæ£ç¢ºã«ç¥ã£ãŠããããšã確èªãããã¹ãŠã®åé¡é åã§çµæãèªçŽããŠãã ããã
åé¡ã®ããè¡ã確çŽãããåŸããããæ¬æ¥ããã¹ããã©ããã確èªããå¿ èŠããããŸããUnicodeã³ãŒããã£ãŒãã® WebããŒãžãããã«åœ¹ç«ã¡ãŸããã確ããªæåã»ãããéžæããã¢ã«ãã¡ãããé ã«æåãæ€çŽ¢ã§ããŸããæååã®åæåãæ£ããå€ãæã£ãŠããããšã確èªããŠãã ãããã·ã³ãã«ããŒã¿ã¹ããªãŒã ãç ŽæããŠããã¢ããªã±ãŒã·ã§ã³å ã®å ŽæãèŠã€ãããããã«ããã®å Žæã調ã¹ããšã©ãŒã®åå ãèŠã€ããŠä¿®æ£ããŸãããã¹ãŠã®ãšã©ãŒãä¿®æ£ããããã¢ããªã±ãŒã·ã§ã³ãæ£åžžã«åäœããŠããããšã確èªããŠãã ããã
ãããã«
ãœãããŠã§ã¢éçºã§çºçãããšã©ãŒã®å€§åãšåæ§ã«ãããã¹ãã«é¢ããåé¡ã¯ãæ®éçãªãåå²çµ±æ²»ãæŠç¥ã䜿çšããŠè§£æ±ºãããŸãããã¹ãŠã®ã¹ãããã«èªä¿¡ãæãŠã°ãäžè¬çã«èªä¿¡ãæã€ããšãã§ããŸãããã®ãããªãšã©ãŒã®ä¿®æ£äžã«ãç¹ã«ç解äžèœã§å¥åŠãªãšã©ãŒã®å åã«ééããå Žåãä¿®æ£åŸãã³ãŒãã®ãã®ã»ã¯ã·ã§ã³ãåäœãã¹ãã§ã«ããŒããããšã匷ããå§ãããŸãããããã¯ãèµ·ãããããããªãããšã®ææžåãšãå°æ¥ã®ååž°ã«å¯Ÿããä¿è·ã®äž¡æ¹ã®åœ¹å²ãæããã§ãããã
ãœãŒã¹
- ãžã§ã³ã»ã¹ããŒããUnicodeããã³.NET
- ãžã§ã³ã»ã¹ããŒããUnicodeåé¡ã®ãããã°