From: nisikimi Date: Tue, 13 Apr 2004 06:44:32 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: withdl~305 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=93ac231a7e8ae22d6d072690a94f5282260629a4;p=m17n%2Fm17n-lib.git *** empty log message *** --- diff --git a/src/coding.c b/src/coding.c index eb7cc95..0dd09cd 100644 --- a/src/coding.c +++ b/src/coding.c @@ -35,15 +35,14 @@ coding system into an M-text, and inversely, can encode an M-text into a byte sequence. */ -/***oldja +/***ja @addtogroup m17nConv @brief ¥³¡¼¥É·Ï¥ª¥Ö¥¸¥§¥¯¥È¤È¤½¤ì¤Ë´Ø¤¹¤ë API - m17n ¥é¥¤¥Ö¥é¥ê¤Ï¡¢Éä¹æ²½Ê¸»ú½¸¹ç (coded character sets; CCS) ¤Îʸ + m17n ¥é¥¤¥Ö¥é¥ê¤Ï¡¢Éä¹æ²½Ê¸»ú½¸¹ç (coded character set; CCS) ¤Îʸ »úÉä¹ç²½Êý¼° (character encoding scheme; CES) ¤ò @e ¥³¡¼¥É·Ï ¤È¸Æ - ¤Ö¥ª¥Ö¥¸¥§¥¯¥È¤Çɽ¸½¤¹¤ë¡£m17n ¥é¥¤¥Ö¥é¥ê¤¬¥µ¥Ý¡¼¥È¤¹¤ëCES ¤Ï¡¢ - UTF-8, UTF-16, ISO-2022, DIRECT-CHARSET, ¤½¤Î¾¡¢¤ËÂçÊ̤µ¤ì¤ë¡£¥¢ - ¥×¥ê¥±¡¼¥·¥ç¥ó¥×¥í¥°¥é¥à¤¬Æȼ«¤Ë¥³¡¼¥É·Ï¤òÄɲ乤뤳¤È¤â²Äǽ¤Ç¤¢¤ë¡£ + ¤Ö¥ª¥Ö¥¸¥§¥¯¥È¤Çɽ¸½¤¹¤ë¡£¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥×¥í¥°¥é¥à¤ÏÆȼ«¤Ë¥³¡¼¥É + ·Ï¤òÄɲ乤뤳¤È¤â¤Ç¤­¤ë¡£ ¥³¡¼¥É¥Ý¥¤¥ó¥È¤«¤éʸ»ú¥³¡¼¥É¤Ø¤ÎÊÑ´¹¤ò @e ¥¨¥ó¥³¡¼¥É ¤È¸Æ¤Ó¡¢Ê¸»ú ¥³¡¼¥É¤«¤é¥³¡¼¥É¥Ý¥¤¥ó¥È¤Ø¤ÎÊÑ´¹¤ò @e ¥Ç¥³¡¼¥É ¤È¸Æ¤Ö¡£ @@ -3084,7 +3083,7 @@ mcoding__load_from_database () /*=*/ /***en @name Variables: Symbols representing a coding system */ -/***oldja @name ÊÑ¿ô: ÄêµÁºÑ¤ß¥³¡¼¥É·Ï¤ò»ØÄꤹ¤ë¤¿¤á¤Î¥·¥ó¥Ü¥ë */ +/***ja @name ÊÑ¿ô: ÄêµÁºÑ¤ß¥³¡¼¥É·Ï¤ò»ØÄꤹ¤ë¤¿¤á¤Î¥·¥ó¥Ü¥ë */ /*** @{ */ /*=*/ @@ -3094,13 +3093,12 @@ mcoding__load_from_database () The symbol #Mcoding_us_ascii has name "us-ascii" and represents a coding system for the CES US-ASCII. */ -/***oldja - @brief MIME charset "US-ASCII" ¤ËÂбþ¤¹¤ë¥³¡¼¥É·Ï¤Î¥·¥ó¥Ü¥ë +/***ja + @brief US-ASCII ¥³¡¼¥É·Ï¤Î¥·¥ó¥Ü¥ë - ¥·¥ó¥Ü¥ë @c Mcoding_us_ascii ¤Ï "us-ascii" ¤È¤¤¤¦Ì¾Á°¤ò»ý¤Á¡¢ - MIME charset "US-ASCII" ¤ËÂбþ¤¹¤ë¥³¡¼¥É·Ï¤ò»ØÄꤹ¤ë¤¿¤á - ¤Ë»È¤ï¤ì¤ë¡£ - */ + ¥·¥ó¥Ü¥ë #Mcoding_us_ascii ¤Ï "us-ascii" ¤È¤¤¤¦Ì¾Á°¤ò»ý¤Á¡¢ + CES US-ASCII ÍѤΥ³¡¼¥É·Ï¤ò¼¨¤¹¡£ + */ MSymbol Mcoding_us_ascii; /*=*/ @@ -3110,12 +3108,11 @@ MSymbol Mcoding_us_ascii; The symbol #Mcoding_iso_8859_1 has name "iso-8859-1" and represents a coding system for the CES ISO-8859-1. */ -/***oldja - @brief MIME charset "ISO-8859-1" ¤ËÂбþ¤¹¤ë¥³¡¼¥É·Ï¤Î¥·¥ó¥Ü¥ë +/***ja + @brief ISO-8859-1 ¥³¡¼¥É·Ï¤Î¥·¥ó¥Ü¥ë - ¥·¥ó¥Ü¥ë @c Mcoding_iso_8859_1 ¤Ï "iso-8859-1" ¤È¤¤¤¦Ì¾Á° - ¤ò»ý¤Á¡¢MIME charset "ISO-8859-1" ¤ËÂбþ¤¹¤ë¥³¡¼¥É·Ï¤ò»Ø - Äꤹ¤ë¤¿¤á¤Ë»È¤ï¤ì¤ë¡£ */ + ¥·¥ó¥Ü¥ë #Mcoding_iso_8859_1 ¤Ï "iso-8859-1" ¤È¤¤¤¦Ì¾Á° + ¤ò»ý¤Á¡¢CES ISO-8859-1 ÍѤΥ³¡¼¥É·Ï¤ò¼¨¤¹¡£ */ MSymbol Mcoding_iso_8859_1; /*=*/ @@ -3126,20 +3123,18 @@ MSymbol Mcoding_iso_8859_1; The symbol #Mcoding_utf_8 has name "utf-8" and represents a coding system for the CES UTF-8. */ -/***oldja - @brief RFC 2279 ¤Î "UTF-8" ¤ËÂбþ¤¹¤ë¥³¡¼¥É·Ï¤Î¥·¥ó¥Ü¥ë¡ÊUnicode ÍÑ¡Ë +/***ja + @brief UTF-8 ¥³¡¼¥É·Ï¤Î¥·¥ó¥Ü¥ë - ¥·¥ó¥Ü¥ë @c Mcoding_utf_8 ¤Ï "utf-8" ¤È¤¤¤¦Ì¾Á°¤ò»ý¤Á¡¢ - RFC 2279 ¤ÇÄêµÁ¤µ¤ì¤ë"UTF-8" ¤ËÂбþ¤¹¤ë¥³¡¼¥É·Ï¤ò»ØÄꤹ¤ë - ¤¿¤á¤Ë»È¤ï¤ì¤ë¡£¤³¤Î¥³¡¼¥É·Ï¤Ï Unicode ¤ÎÁ´¤Æ¤Îʸ»ú¤ò¥µ¥Ý¡¼¥È¤¹¤ë¡£ + ¥·¥ó¥Ü¥ë #Mcoding_utf_8 ¤Ï "utf-8" ¤È¤¤¤¦Ì¾Á°¤ò»ý¤Á¡¢CES + UTF-8 ÍѤΥ³¡¼¥É·Ï¤ò¼¨¤¹¡£ */ MSymbol Mcoding_utf_8; /*=*/ /***en - @brief UTF-8-FULL - + @brief Symbol for the coding system UTF-8-FULL The symbol #Mcoding_utf_8_full has name "utf-8-full" and represents a coding system that is a extension of UTF-8. This @@ -3147,82 +3142,117 @@ MSymbol Mcoding_utf_8; limited to the Unicode characters. It can encode all characters supported by the m17n library. */ -/***oldja - @brief RFC 2279 ¤Î "UTF-8" ¤ËÂбþ¤¹¤ë¥³¡¼¥É·Ï¤Î¥·¥ó¥Ü¥ë¡ÊÁ´Ê¸»úÍÑ¡Ë +/***ja + @brief UTF-8-FULL ¥³¡¼¥É·Ï¤Î¥·¥ó¥Ü¥ë - ¥·¥ó¥Ü¥ë @c Mcoding_utf_8_full ¤Ï "utf-8-full" ¤È¤¤¤¦Ì¾Á° - ¤ò»ý¤Á¡¢RFC 2279 ¤ÇÄêµÁ¤µ¤ì¤ë"UTF-8" ¤ËÂбþ¤¹¤ë¥³¡¼¥É·Ï¤ò - »ØÄꤹ¤ë¤¿¤á¤Ë»È¤ï¤ì¤ë¡£¤³¤Î¥³¡¼¥É·Ï¤Ï m17n ¥é¥¤¥Ö¥é¥ê¤¬°·¤¦Á´¤Æ¤Î - ʸ»ú¤ò¥µ¥Ý¡¼¥È¤¹¤ë¡£ */ + ¥·¥ó¥Ü¥ë #Mcoding_utf_8_full ¤Ï "utf-8-full" ¤È¤¤¤¦Ì¾Á°¤ò + »ý¤Á¡¢"UTF-8" ¤Î³ÈÄ¥¤Ç¤¢¤ë¥³¡¼¥É·Ï¤ò¼¨¤¹¡£¤³¤Î¥³¡¼¥É·Ï¤Ï + UTF-8 ¤ÈƱ¤¸¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¥¢¥ë¥´¥ê¥º¥à¤òÍѤ¤¤ë¤¬¡¢ÂÐ¾Ý¤Ï Unicode + ¤Îʸ»ú¤Ë¸Â¤é¤Ê¤¤¡£¤Þ¤¿m17n ¥é¥¤¥Ö¥é¥ê¤¬°·¤¦Á´¤Æ¤Îʸ»ú¤ò¥¨¥ó¥³¡¼¥É + ¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£ + */ MSymbol Mcoding_utf_8_full; /*=*/ /***en - @brief UTF-16 + @brief Symbol for the coding system UTF-16 The symbol #Mcoding_utf_16 has name "utf-16" and represents a coding system for the CES UTF-16 (RFC 2279). */ -/***oldja - @brief RFC 2781 ¤Î "UTF-16" ¤ËÂбþ¤¹¤ë¥³¡¼¥É·Ï¤Î¥·¥ó¥Ü¥ë +/***ja + @brief UTF-16 ¥³¡¼¥É·Ï¤Î¥·¥ó¥Ü¥ë - ¥·¥ó¥Ü¥ë @c Mcoding_utf_16 ¤Ï "utf-16" ¤È¤¤¤¦Ì¾Á°¤ò»ý¤Á¡¢ - RFC 2279 ¤ÇÄêµÁ¤µ¤ì¤ë"UTF-16" ¤ËÂбþ¤¹¤ë¥³¡¼¥É·Ï¤ò»ØÄꤹ - ¤ë¤¿¤á¤Ë»È¤ï¤ì¤ë¡£¤³¤Î¥³¡¼¥É·Ï¤Ï Unicode ¤ÎÁ´¤Æ¤Îʸ»ú¤ò¥µ¥Ý¡¼¥È¤¹ - ¤ë¡£ */ + ¥·¥ó¥Ü¥ë #Mcoding_utf_16 ¤Ï "utf-16" ¤È¤¤¤¦Ì¾Á°¤ò»ý¤Á¡¢ + CES UTF-16 (RFC 2279) ÍѤΥ³¡¼¥É·Ï¤ò¼¨¤¹¡£ + */ MSymbol Mcoding_utf_16; /*=*/ /***en - @brief UTF-16BE + @brief Symbol for the coding system UTF-16BE The symbol #Mcoding_utf_16be has name "utf-16be" and represents a coding system for the CES UTF-16BE (RFC 2279). */ +/***ja + @brief UTF-16BE ¥³¡¼¥É·Ï¤Î¥·¥ó¥Ü¥ë + + ¥·¥ó¥Ü¥ë #Mcoding_utf_16be ¤Ï "utf-16be" ¤È¤¤¤¦Ì¾Á°¤ò»ý¤Á¡¢ + CES UTF-16BE (RFC 2279) ÍѤΥ³¡¼¥É·Ï¤ò¼¨¤¹¡£ */ + MSymbol Mcoding_utf_16be; /*=*/ /***en - @brief UTF-16LE + @brief Symbol for the coding system UTF-16LE The symbol #Mcoding_utf_16le has name "utf-16le" and represents a coding system for the CES UTF-16LE (RFC 2279). */ +/***ja + @brief UTF-16LE ¥³¡¼¥É·Ï¤Î¥·¥ó¥Ü¥ë + + ¥·¥ó¥Ü¥ë #Mcoding_utf_16le ¤Ï "utf-16le" ¤È¤¤¤¦Ì¾Á°¤ò»ý¤Á¡¢ + CES UTF-16LE (RFC 2279) ÍѤΥ³¡¼¥É·Ï¤ò¼¨¤¹¡£ */ + MSymbol Mcoding_utf_16le; /*=*/ /***en - @brief UTF-32 + @brief Symbol for the coding system UTF-32 The symbol #Mcoding_utf_32 has name "utf-32" and represents a coding system for the CES UTF-32 (RFC 2279). */ +/***ja + @brief UTF-32 ¥³¡¼¥É·Ï¤Î¥·¥ó¥Ü¥ë + + ¥·¥ó¥Ü¥ë #Mcoding_utf_32 ¤Ï "utf-32" ¤È¤¤¤¦Ì¾Á°¤ò»ý¤Á¡¢ + CES UTF-32 (RFC 2279) ÍѤΥ³¡¼¥É·Ï¤ò¼¨¤¹¡£ */ + MSymbol Mcoding_utf_32; /*=*/ /***en - @brief UTF-32be + @brief Symbol for the coding system UTF-32be The symbol #Mcoding_utf_32be has name "utf-32be" and represents a coding system for the CES UTF-32BE (RFC 2279). */ +/***ja + @brief UTF-32be ¥³¡¼¥É·Ï¤Î¥·¥ó¥Ü¥ë + + ¥·¥ó¥Ü¥ë #Mcoding_utf_32be ¤Ï "utf-32be" ¤È¤¤¤¦Ì¾Á°¤ò»ý¤Á¡¢ + CES UTF-32BE (RFC 2279) ÍѤΥ³¡¼¥É·Ï¤ò¼¨¤¹¡£ */ MSymbol Mcoding_utf_32be; /*=*/ /***en - @brief UTF-32LE + @brief Symbol for the coding system UTF-32LE The symbol #Mcoding_utf_32le has name "utf-32le" and represents a coding system for the CES UTF-32LE (RFC 2279). */ +/***ja + @brief UTF-32LE ¥³¡¼¥É·Ï¤Î¥·¥ó¥Ü¥ë + + ¥·¥ó¥Ü¥ë #Mcoding_utf_32le ¤Ï "utf-32le" ¤È¤¤¤¦Ì¾Á°¤ò»ý¤Á¡¢ + CES UTF-32LE (RFC 2279) ÍѤΥ³¡¼¥É·Ï¤ò¼¨¤¹¡£ */ + MSymbol Mcoding_utf_32le; /*=*/ /***en - @brief SJIS + @brief Symbol for the coding system SJIS The symbol #Mcoding_sjis has name "sjis" and represents a coding system for the CES Shift-JIS. */ +/***ja + @brief SJIS ¥³¡¼¥É·Ï¤Î¥·¥ó¥Ü¥ë + + ¥·¥ó¥Ü¥ë #Mcoding_sjis has ¤Ï "sjis" ¤È¤¤¤¦Ì¾Á°¤ò»ý¤Á¡¢ + CES Shift-JISÍѤΥ³¡¼¥É·Ï¤ò¼¨¤¹¡£ */ MSymbol Mcoding_sjis; /*** @} */ @@ -3230,11 +3260,15 @@ MSymbol Mcoding_sjis; /***en @name Variables: Parameter keys for mconv_define_coding (). */ +/***ja + @name ÊÑ¿ô: mconv_define_coding () Íѥѥé¥á¡¼¥¿¥­¡¼ */ /*** @{ */ /*=*/ /***en Parameter key for mconv_define_coding () (which see). */ +/***ja + mconv_define_coding () Íѥѥé¥á¡¼¥¿¥­¡¼ (¾ÜºÙ¤Ï mconv_define_coding ()»²¾È). */ MSymbol Mtype; /*=*/ @@ -3250,6 +3284,8 @@ MSymbol Mlittle_endian; /***en @name Variables: Symbols representing coding system type. */ +/***ja + @name ÊÑ¿ô¡§ ¥³¡¼¥É·Ï¤Î¥¿¥¤¥×¤ò¼¨¤¹¥·¥ó¥Ü¥ë. */ /*** @{ */ /*=*/ @@ -3257,6 +3293,10 @@ MSymbol Mlittle_endian; Symbol that can be a value of the #Mtype parameter of a coding system used in an argument to the mconv_define_coding () function (which see). */ +/***ja + ´Ø¿ô mconv_define_coding () ¤Î°ú¿ô¤È¤·¤ÆÍѤ¤¤é¤ì¤ë¡¢¥³¡¼¥É·Ï¤Î + ¥Ñ¥é¥á¡¼¥¿ #Mtype ¤ÎÃͤȤʤêÆÀ¤ë¥·¥ó¥Ü¥ë¡£(¾ÜºÙ¤Ï + mconv_define_coding ()»²¾È)¡£ */ MSymbol Mutf; /*=*/ @@ -3266,7 +3306,9 @@ MSymbol Miso_2022; /*=*/ /***en - @name Variables: Symbols appearing in the value of #Mfrag parameter. */ + @name Variables: Symbols appearing in the value of #Mflags parameter. */ +/***ja + @name ÊÑ¿ô¡§ ¥Ñ¥é¥á¡¼¥¿ #Mflags ¤ÎÃͤȤʤêÆÀ¤ë¥·¥ó¥Ü¥ë. */ /*** @{ */ /*=*/ @@ -3274,6 +3316,10 @@ MSymbol Miso_2022; Symbol that can be a value of the #Mflags parameter of a coding system used in an argument to the mconv_define_coding () function (which see). */ +/***ja + ´Ø¿ô mconv_define_coding () ¤Î°ú¿ô¤È¤·¤ÆÍѤ¤¤é¤ì¤ë¡¢¥³¡¼¥É·Ï¤Î + ¥Ñ¥é¥á¡¼¥¿ #Mflags ¤ÎÃͤȤʤêÆÀ¤ë¥·¥ó¥Ü¥ë¡£(¾ÜºÙ¤Ï + mconv_define_coding ()»²¾È)¡£ */ MSymbol Mreset_at_eol; /*=*/ MSymbol Mreset_at_cntl; @@ -3297,7 +3343,9 @@ MSymbol Mfull_support; @name Variables: etc Remaining variables. */ -/***oldja @name ÊÑ¿ô: ¤½¤Î¾ */ +/***ja @name ÊÑ¿ô: ¤½¤Î¾ + + ¤Û¤«¤ÎÊÑ¿ô¡£ */ /*** @{ */ /*=*/ /***en @@ -3306,6 +3354,12 @@ MSymbol Mfull_support; The variable #Mmaybe is a symbol of name "maybe". It is used a value of #Mbom parameter of the function mconv_define_coding () (which see). */ +/***ja + @brief "maybe"¤È¤¤¤¦Ì¾Á°¤ò»ý¤Ä¥·¥ó¥Ü¥ë + + ÊÑ¿ô #Mmaybe ¤Ï "maybe" ¤È¤¤¤¦Ì¾Á°¤ò»ý¤Ä¡£¤³¤ì¤Ï´Ø¿ô + mconv_define_coding () ¥Ñ¥é¥á¡¼¥¿ #Mbom ¤ÎÃͤȤ·¤ÆÍѤ¤¤é¤ì¤ë¡£(¾Ü + ºÙ¤Ï mconv_define_coding () »²¾È)¡£ */ MSymbol Mmaybe; /*=*/ @@ -3317,12 +3371,12 @@ MSymbol Mmaybe; symbol @c Mcoding. The name of @c Mcoding is "coding". */ -/***oldja +/***ja @brief ¥·¥ó¥Ü¥ë @c Mcoding - ¥Ç¥³¡¼¥É¤µ¤ì¤¿ M-text ¤Ï¡¢¥­¡¼¤¬ @c Mcoding ¤Ç¤¢¤ë¤è¤¦¤Ê¥Æ¥­¥¹¥È¥× - ¥í¥Ñ¥Æ¥£¤ò»ý¤Ä¡£¥·¥ó¥Ü¥ë @c Mcoding ¤Ï "coding" ¤È¤¤¤¦Ì¾ - Á°¤Ç¤¢¤é¤«¤¸¤áÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£ */ + ¥Ç¥³¡¼¥É¤µ¤ì¤¿ M-text ¤Ï¤¹¤Ù¤Æ¡¢¥­¡¼¤¬ÄêµÁºÑ¤ß¥·¥ó¥Ü¥ë @c Mcoding + ¤Ç¤¢¤ë¤è¤¦¤Ê¥Æ¥­¥¹¥È¥×¥í¥Ñ¥Æ¥£¤ò»ý¤Ä¡£¥·¥ó¥Ü¥ë @c Mcoding ¤Ï + "coding" ¤È¤¤¤¦Ì¾Á°¤ò»ý¤Ä¡£ */ MSymbol Mcoding; /*=*/ @@ -3334,7 +3388,7 @@ MSymbol Mcoding; The mconv_define_coding () function defines a new coding system and makes it accessive via a symbol whose name is $NAME. $PLIST - specifies parameters of the charset as below: + specifies parameters of the coding system as below: