X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fcoding.c;h=3a7bfc1048e55358a064571465e73af140eed83f;hb=3b29c2be9bc7b339f2d62c0add0f488b55f7126b;hp=eb7cc9556260b7e6baf7e45cc014fd88d0374565;hpb=b403579aa1e9704ab35659e856dde8582cb4c3f1;p=m17n%2Fm17n-lib.git diff --git a/src/coding.c b/src/coding.c index eb7cc95..3a7bfc1 100644 --- a/src/coding.c +++ b/src/coding.c @@ -35,22 +35,21 @@ coding system into an M-text, and inversely, can encode an M-text into a byte sequence. */ -/***oldja +/***ja @addtogroup m17nConv - @brief ¥³¡¼¥É·Ï¥ª¥Ö¥¸¥§¥¯¥È¤È¤½¤ì¤Ë´Ø¤¹¤ë API + @brief ¥³¡¼¥É·Ï¥ª¥Ö¥¸¥§¥¯¥È¤È¤½¤ì¤Ë´Ø¤¹¤ë API. - m17n ¥é¥¤¥Ö¥é¥ê¤Ï¡¢Éä¹æ²½Ê¸»ú½¸¹ç (coded character sets; CCS) ¤Îʸ - »úÉä¹ç²½Êý¼° (character encoding scheme; CES) ¤ò @e ¥³¡¼¥É·Ï ¤È¸Æ - ¤Ö¥ª¥Ö¥¸¥§¥¯¥È¤Çɽ¸½¤¹¤ë¡£m17n ¥é¥¤¥Ö¥é¥ê¤¬¥µ¥Ý¡¼¥È¤¹¤ëCES ¤Ï¡¢ - UTF-8, UTF-16, ISO-2022, DIRECT-CHARSET, ¤½¤Î¾¡¢¤ËÂçÊ̤µ¤ì¤ë¡£¥¢ - ¥×¥ê¥±¡¼¥·¥ç¥ó¥×¥í¥°¥é¥à¤¬Æȼ«¤Ë¥³¡¼¥É·Ï¤òÄɲ乤뤳¤È¤â²Äǽ¤Ç¤¢¤ë¡£ + m17n ¥é¥¤¥Ö¥é¥ê¤Ï¡¢Éä¹æ²½Ê¸»ú½¸¹ç (coded character set; CCS) + ¤Îʸ»úÉä¹ç²½Êý¼° (character encoding scheme; CES) ¤ò @e ¥³¡¼¥É·Ï + ¤È¸Æ¤Ö¥ª¥Ö¥¸¥§¥¯¥È¤Çɽ¸½¤¹¤ë¡£ + ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥×¥í¥°¥é¥à¤ÏÆȼ«¤Ë¥³¡¼¥É·Ï¤òÄɲ乤뤳¤È¤â¤Ç¤­¤ë¡£ - ¥³¡¼¥É¥Ý¥¤¥ó¥È¤«¤éʸ»ú¥³¡¼¥É¤Ø¤ÎÊÑ´¹¤ò @e ¥¨¥ó¥³¡¼¥É ¤È¸Æ¤Ó¡¢Ê¸»ú - ¥³¡¼¥É¤«¤é¥³¡¼¥É¥Ý¥¤¥ó¥È¤Ø¤ÎÊÑ´¹¤ò @e ¥Ç¥³¡¼¥É ¤È¸Æ¤Ö¡£ + ¥³¡¼¥É¥Ý¥¤¥ó¥È¤«¤éʸ»ú¥³¡¼¥É¤Ø¤ÎÊÑ´¹¤ò @e ¥¨¥ó¥³¡¼¥É + ¤È¸Æ¤Ó¡¢Ê¸»ú¥³¡¼¥É¤«¤é¥³¡¼¥É¥Ý¥¤¥ó¥È¤Ø¤ÎÊÑ´¹¤ò @e ¥Ç¥³¡¼¥É ¤È¸Æ¤Ö¡£ - ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥×¥í¥°¥é¥à¤Ï¡¢»ØÄꤵ¤ì¤¿¥³¡¼¥É·Ï¤Ç¥Ð¥¤¥ÈÎó¤ò¥Ç¥³¡¼ - ¥É¤¹¤ë¤³¤È¤Ç M-text ¤òÆÀ¤ë¤³¤È¤¬¤Ç¤­¤ë¡£¤Þ¤¿µÕ¤Ë¡¢»ØÄꤵ¤ì¤¿¥³¡¼¥É - ·Ï¤Ç M-text ¤ò¥¨¥ó¥³¡¼¥É¤·¤¹¤ë¤³¤È¤Ç¥Ð¥¤¥ÈÎó¤òÆÀ¤ë¤³¤È¤¬¤Ç¤­¤ë¡£ */ + ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥×¥í¥°¥é¥à¤Ï¡¢»ØÄꤵ¤ì¤¿¥³¡¼¥É·Ï¤Ç¥Ð¥¤¥ÈÎó¤ò¥Ç¥³¡¼¥É¤¹¤ë¤³¤È¤Ë¤è¤Ã¤Æ + M-text ¤òÆÀ¤ë¤³¤È¤¬¤Ç¤­¤ë¡£¤Þ¤¿µÕ¤Ë¡¢»ØÄꤵ¤ì¤¿¥³¡¼¥É·Ï¤Ç M-text + ¤ò¥¨¥ó¥³¡¼¥É¤·¤¹¤ë¤³¤È¤Ë¤è¤Ã¤Æ¥Ð¥¤¥ÈÎó¤òÆÀ¤ë¤³¤È¤¬¤Ç¤­¤ë¡£ */ /*=*/ @@ -100,7 +99,7 @@ typedef struct reseting a converter. */ int (*resetter) (MConverter *converter); - int (*decoder) (unsigned char *str, int str_bytes, MText *mt, + int (*decoder) (const unsigned char *str, int str_bytes, MText *mt, MConverter *converter); int (*encoder) (MText *mt, int from, int to, @@ -391,8 +390,8 @@ encode_unsupporeted_char (int c, unsigned char *dst, unsigned char *dst_end, static int finish_decoding (MText *mt, MConverter *converter, int nchars, - unsigned char *source, unsigned char *src_end, - unsigned char *src, + const unsigned char *source, const unsigned char *src_end, + const unsigned char *src, int error) { MConverterStatus *internal = (MConverterStatus *) converter->internal_info; @@ -421,7 +420,7 @@ finish_decoding (MText *mt, MConverter *converter, int nchars, { unsigned char *dst = mt->data + mt->nbytes; unsigned char *dst_end = mt->data + mt->allocated; - unsigned char *src_stop = src_end; + const unsigned char *src_stop = src_end; int c; int last_nchars = nchars; @@ -512,15 +511,15 @@ reset_coding_charset (MConverter *converter) } static int -decode_coding_charset (unsigned char *source, int src_bytes, MText *mt, +decode_coding_charset (const unsigned char *source, int src_bytes, MText *mt, MConverter *converter) { MConverterStatus *internal = (MConverterStatus *) converter->internal_info; MCodingSystem *coding = internal->coding; - unsigned char *src = internal->carryover; - unsigned char *src_stop = src + internal->carryover_bytes; - unsigned char *src_end = source + src_bytes; - unsigned char *src_base; + const unsigned char *src = internal->carryover; + const unsigned char *src_stop = src + internal->carryover_bytes; + const unsigned char *src_end = source + src_bytes; + const unsigned char *src_base; unsigned char *dst = mt->data + mt->nbytes; unsigned char *dst_end = mt->data + mt->allocated; int nchars = 0; @@ -713,15 +712,15 @@ encode_coding_charset (MText *mt, int from, int to, static int -decode_coding_utf_8 (unsigned char *source, int src_bytes, MText *mt, +decode_coding_utf_8 (const unsigned char *source, int src_bytes, MText *mt, MConverter *converter) { MConverterStatus *internal = (MConverterStatus *) converter->internal_info; MCodingSystem *coding = internal->coding; - unsigned char *src = internal->carryover; - unsigned char *src_stop = src + internal->carryover_bytes; - unsigned char *src_end = source + src_bytes; - unsigned char *src_base; + const unsigned char *src = internal->carryover; + const unsigned char *src_stop = src + internal->carryover_bytes; + const unsigned char *src_end = source + src_bytes; + const unsigned char *src_base; unsigned char *dst = mt->data + mt->nbytes; unsigned char *dst_end = mt->data + mt->allocated; int nchars = 0; @@ -922,14 +921,14 @@ reset_coding_utf (MConverter *converter) } static int -decode_coding_utf_16 (unsigned char *source, int src_bytes, MText *mt, +decode_coding_utf_16 (const unsigned char *source, int src_bytes, MText *mt, MConverter *converter) { MConverterStatus *internal = (MConverterStatus *) converter->internal_info; - unsigned char *src = internal->carryover; - unsigned char *src_stop = src + internal->carryover_bytes; - unsigned char *src_end = source + src_bytes; - unsigned char *src_base; + const unsigned char *src = internal->carryover; + const unsigned char *src_stop = src + internal->carryover_bytes; + const unsigned char *src_end = source + src_bytes; + const unsigned char *src_base; unsigned char *dst = mt->data + mt->nbytes; unsigned char *dst_end = mt->data + mt->allocated; int nchars = 0; @@ -1026,14 +1025,14 @@ decode_coding_utf_16 (unsigned char *source, int src_bytes, MText *mt, static int -decode_coding_utf_32 (unsigned char *source, int src_bytes, MText *mt, +decode_coding_utf_32 (const unsigned char *source, int src_bytes, MText *mt, MConverter *converter) { MConverterStatus *internal = (MConverterStatus *) converter->internal_info; - unsigned char *src = internal->carryover; - unsigned char *src_stop = src + internal->carryover_bytes; - unsigned char *src_end = source + src_bytes; - unsigned char *src_base; + const unsigned char *src = internal->carryover; + const unsigned char *src_stop = src + internal->carryover_bytes; + const unsigned char *src_end = source + src_bytes; + const unsigned char *src_base; unsigned char *dst = mt->data + mt->nbytes; unsigned char *dst_end = mt->data + mt->allocated; int nchars = 0; @@ -1525,15 +1524,15 @@ find_ctext_non_standard_charset (char *charset_name) } static int -decode_coding_iso_2022 (unsigned char *source, int src_bytes, MText *mt, +decode_coding_iso_2022 (const unsigned char *source, int src_bytes, MText *mt, MConverter *converter) { MConverterStatus *internal = (MConverterStatus *) converter->internal_info; MCodingSystem *coding = internal->coding; - unsigned char *src = internal->carryover; - unsigned char *src_stop = src + internal->carryover_bytes; - unsigned char *src_end = source + src_bytes; - unsigned char *src_base; + const unsigned char *src = internal->carryover; + const unsigned char *src_stop = src + internal->carryover_bytes; + const unsigned char *src_end = source + src_bytes; + const unsigned char *src_base; unsigned char *dst = mt->data + mt->nbytes; unsigned char *dst_end = mt->data + mt->allocated; int nchars = 0; @@ -2635,7 +2634,7 @@ reset_coding_sjis (MConverter *converter) MSymbol kana_sym = msymbol ("jisx0201-kana"); MCharset *kana = MCHARSET (kana_sym); - if (! kanji_sym || ! kana_sym) + if (! kanji || ! kana) return -1; coding->ncharsets = 3; coding->charsets[1] = kanji; @@ -2646,15 +2645,15 @@ reset_coding_sjis (MConverter *converter) } static int -decode_coding_sjis (unsigned char *source, int src_bytes, MText *mt, +decode_coding_sjis (const unsigned char *source, int src_bytes, MText *mt, MConverter *converter) { MConverterStatus *internal = (MConverterStatus *) converter->internal_info; MCodingSystem *coding = internal->coding; - unsigned char *src = internal->carryover; - unsigned char *src_stop = src + internal->carryover_bytes; - unsigned char *src_end = source + src_bytes; - unsigned char *src_base; + const unsigned char *src = internal->carryover; + const unsigned char *src_stop = src + internal->carryover_bytes; + const unsigned char *src_end = source + src_bytes; + const unsigned char *src_base; unsigned char *dst = mt->data + mt->nbytes; unsigned char *dst_end = mt->data + mt->allocated - MAX_UTF8_CHAR_BYTES; int nchars = 0; @@ -2819,14 +2818,19 @@ find_coding (MSymbol name) if (! coding) { - MPlist *param = mplist_get (coding_definition_list, name); + MPlist *plist, *pl; + MSymbol sym = msymbol__canonicalize (name); - if (! param) + plist = mplist_find_by_key (coding_definition_list, sym); + if (! plist) return NULL; - param = mplist__from_plist (param); - mconv_define_coding (MSYMBOL_NAME (name), param, NULL, NULL, NULL, NULL); + pl = MPLIST_PLIST (plist); + name = MPLIST_VAL (pl); + mconv_define_coding (MSYMBOL_NAME (name), MPLIST_NEXT (pl), + NULL, NULL, NULL, NULL); coding = (MCodingSystem *) msymbol_get (name, Mcoding); - M17N_OBJECT_UNREF (param); + plist = mplist_pop (plist); + M17N_OBJECT_UNREF (plist); } return coding; } @@ -3004,31 +3008,19 @@ mcoding__fini (void) } void -mconv__define_coding_from_charset (MSymbol sym) -{ - MPlist *param = mplist (), *charsets = mplist (); - - mplist_set (charsets, Msymbol, sym); - mplist_add (param, Mtype, Mcharset); - mplist_add (param, Mcharsets, charsets); - mconv_define_coding (msymbol_name (sym), param, NULL, NULL, NULL, NULL); - M17N_OBJECT_UNREF (charsets); - M17N_OBJECT_UNREF (param); -} - -void mconv__register_charset_coding (MSymbol sym) { - if (! mplist_find_by_key (coding_definition_list, sym)) + MSymbol name = msymbol__canonicalize (sym); + + if (! mplist_find_by_key (coding_definition_list, name)) { MPlist *param = mplist (), *charsets = mplist (); mplist_set (charsets, Msymbol, sym); - mplist_add (param, Msymbol, Mtype); - mplist_add (param, Msymbol, Mcharset); - mplist_add (param, Msymbol, Mcharsets); - mplist_add (param, Mplist, charsets); - mplist_put (coding_definition_list, sym, param); + mplist_add (param, Msymbol, sym); + mplist_add (param, Mtype, Mcharset); + mplist_add (param, Mcharsets, charsets); + mplist_put (coding_definition_list, name, param); M17N_OBJECT_UNREF (charsets); } } @@ -3055,7 +3047,7 @@ mcoding__load_from_database () MPLIST_DO (plist, def_list) { MPlist *pl; - MSymbol name; + MSymbol name, canonicalized; if (! MPLIST_PLIST_P (plist)) MERROR (MERROR_CHARSET, -1); @@ -3063,9 +3055,10 @@ mcoding__load_from_database () if (! MPLIST_SYMBOL_P (pl)) MERROR (MERROR_CHARSET, -1); name = MPLIST_SYMBOL (pl); - pl = MPLIST_NEXT (pl); - definitions = mplist_add (definitions, name, pl); - M17N_OBJECT_REF (pl); + canonicalized = msymbol__canonicalize (name); + pl = mplist__from_plist (MPLIST_NEXT (pl)); + mplist_push (pl, Msymbol, name); + definitions = mplist_add (definitions, canonicalized, pl); } M17N_OBJECT_UNREF (def_list); @@ -3083,63 +3076,59 @@ mcoding__load_from_database () /*** @{ */ /*=*/ -/***en @name Variables: Symbols representing a coding system */ -/***oldja @name ÊÑ¿ô: ÄêµÁºÑ¤ß¥³¡¼¥É·Ï¤ò»ØÄꤹ¤ë¤¿¤á¤Î¥·¥ó¥Ü¥ë */ +/***en @name Variables: Symbols representing coding systems */ +/***ja @name ÊÑ¿ô: ÄêµÁºÑ¤ß¥³¡¼¥É·Ï¤ò»ØÄꤹ¤ë¤¿¤á¤Î¥·¥ó¥Ü¥ë */ /*** @{ */ /*=*/ /***en - @brief Symbol for the coding system US-ASCII + @brief Symbol for the coding system US-ASCII. 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; /*=*/ /***en - @brief Symbol for the coding system ISO-8859-1 + @brief Symbol for the coding system ISO-8859-1. 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; /*=*/ /***en - @brief Symbol for the coding system UTF-8 + @brief Symbol for the coding system UTF-8. 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 +3136,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 +3254,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; /*=*/ @@ -3249,7 +3277,9 @@ MSymbol Mlittle_endian; /*=*/ /***en - @name Variables: Symbols representing coding system type. */ + @name Variables: Symbols representing coding system types. */ +/***ja + @name ÊÑ¿ô¡§ ¥³¡¼¥É·Ï¤Î¥¿¥¤¥×¤ò¼¨¤¹¥·¥ó¥Ü¥ë. */ /*** @{ */ /*=*/ @@ -3257,6 +3287,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,14 +3300,20 @@ 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 ¤ÎÃͤȤʤêÆÀ¤ë¥·¥ó¥Ü¥ë. */ /*** @{ */ /*=*/ /***en - Symbol that can be a value of the #Mflags parameter of a coding + Symbols 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 +3337,9 @@ MSymbol Mfull_support; @name Variables: etc Remaining variables. */ -/***oldja @name ÊÑ¿ô: ¤½¤Î¾ */ +/***ja @name ÊÑ¿ô: ¤½¤Î¾ + + ¤Û¤«¤ÎÊÑ¿ô¡£ */ /*** @{ */ /*=*/ /***en @@ -3306,23 +3348,29 @@ 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; /*=*/ /***en - @brief The symbol @c Mcoding + @brief The symbol @c Mcoding. Any decoded M-text has a text property whose key is the predefined symbol @c Mcoding. The name of @c Mcoding is "coding". */ -/***oldja - @brief ¥·¥ó¥Ü¥ë @c Mcoding +/***ja + @brief ¥·¥ó¥Ü¥ë @c Mcoding. - ¥Ç¥³¡¼¥É¤µ¤ì¤¿ M-text ¤Ï¡¢¥­¡¼¤¬ @c Mcoding ¤Ç¤¢¤ë¤è¤¦¤Ê¥Æ¥­¥¹¥È¥× - ¥í¥Ñ¥Æ¥£¤ò»ý¤Ä¡£¥·¥ó¥Ü¥ë @c Mcoding ¤Ï "coding" ¤È¤¤¤¦Ì¾ - Á°¤Ç¤¢¤é¤«¤¸¤áÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£ */ + ¥Ç¥³¡¼¥É¤µ¤ì¤¿ M-text ¤Ï¤¹¤Ù¤Æ¡¢¥­¡¼¤¬ÄêµÁºÑ¤ß¥·¥ó¥Ü¥ë @c Mcoding + ¤Ç¤¢¤ë¤è¤¦¤Ê¥Æ¥­¥¹¥È¥×¥í¥Ñ¥Æ¥£¤ò»ý¤Ä¡£¥·¥ó¥Ü¥ë @c Mcoding ¤Ï + "coding" ¤È¤¤¤¦Ì¾Á°¤ò»ý¤Ä¡£ */ MSymbol Mcoding; /*=*/ @@ -3330,11 +3378,11 @@ MSymbol Mcoding; /*=*/ /***en - @brief Define a coding system + @brief Define a coding system. 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: + and makes it accessible via a symbol whose name is $NAME. $PLIST + specifies parameters of the coding system as below: