3 def mcs_hex() sprintf("%x", @char_id) end
5 def char_feature_alist() check_all_database(); @features; end
6 def char_feature_list() check_all_database(); @features.keys; end
7 alias alist char_feature_alist
8 alias list char_feature_list
10 def has_feature?() #
\88Ó
\96¡
\82Ì
\82 \82éfeature
\82ð
\8e\9d\82Á
\82Ä
\82Ü
\82·
\82©?
15 return (keys.length != 0)
21 db.get(a, u8) # u8
\82Å
\95\
\82³
\82ê
\82é
\95¶
\8e\9a\82Ìa
\83A
\83g
\83\8a\83r
\83\85\81[
\83g
\82ð
\92²
\82×
\82é
\81B
24 def check_all_database() #
\8c»
\8dÝ
\82Ì@char_id
\82©
\82ç
\81A
\95¶
\8e\9a\83f
\81[
\83^
\83x
\81[
\83X
\82ð
\8eQ
\8fÆ
\82·
\82é
25 return if @check_all_database
26 return if @char_id.nil?
29 atrs = db.get_all(u8) #u8
\82Å
\95\
\82³
\82ê
\82é
\95¶
\8e\9a\82Ì
\83A
\83g
\83\8a\83r
\83\85\81[
\83g
\82ð
\91S
\95\94\8e\9d\82Á
\82Ä
\82±
\82¢
31 @features[a] = v #
\82Æ
\82©
\82¢
\82¤
\8a´
\82¶
\82Å
\91ã
\93ü
\82·
\82é
\82Ì
\82Å
\82¦
\82¦
\82©
\82È?
33 @check_all_database = true #
\8fd
\82¢
\8f\88\97\9d\82È
\82Ì
\82Å
\88ê
\89\9echeck
\82·
\82é
38 #ar=%w{ucs ucs-big5 ucs-cdp ucs-cns ucs-jis ucs-ks =>ucs =>ucs* =>ucs-jis}
39 #ar=%w{ucs ucs-jis ucs-big5 ucs-cdp ucs-cns ucs-ks =>ucs =>ucs* =>ucs-jis}
40 ar = %w{ucs-jis ucs =>ucs-jis}
41 #
\95À
\82Ñ
\8f\87\82Í
\9c\93\88Ó
\93I
\82Å
\81Aucs-jis
\82ð
\90æ
\82É
\8fo
\82µ
\82Ä
\82¢
\82é
\81B
\96{
\97\88\82Í
\82±
\82ê
\82à
\8ew
\92è
\82Å
\82«
\82é
\82æ
\82¤
\82É
\82·
\82é
\82×
\82«
\81B
43 u = get_char_feature(a)
49 #-------------------------------------------------------------------CCS
\8aÖ
\8cW
50 def to_utf8() Uconv.u4tou8(Character.u4itou4(ucs())) end #UTF8
\95¶
\8e\9a\97ñ
\82ð
\95Ô
\82·
56 if u.nil? || 0xffff < u
62 alias map_ucs map_utf8
66 if u.nil? || 0xffff < u
69 return Character.get(u).to_er()
75 return "" if u.nil? || 0xffff < u
76 Uconv.u16toeuc(Uconv.u4tou16(Character.u4itou4(ucs())))
87 return "" if u.nil? || 0xffff < u
88 Uconv.u16tosjis(Uconv.u4tou16(Character.u4itou4(ucs())))
99 EntityReference.each_codesys {|codesys, er_prefix, keta, numtype|
106 def inspect_all_codesys() #
\96¢
\8a®
\90¬
107 #to_er
\82ð
\91S
\82Ä
\82Ìcodesys
\82É
\82¨
\82¢
\82Ä
\8eÀ
\8ds
\82·
\82é
\81B
\82»
\82Ì
\8c\8b\89Ê
\82ð
\83R
\83\93\83p
\83N
\83g
\82É
\82Ü
\82Æ
\82ß
\82é
112 alist.to_a.sort.each {|a, v| ar << "#{a}:#{v}" }
113 return ar.join(",")+">"
118 alist.to_a.sort.each {|a, v| ar << "#{a}:#{v}" }
119 return ar.join('\n')+'\n'
124 alist.to_a.sort.each {|a, v|
125 str += "#{a}: #{v}\n"
130 def inspect_ids(hex_flag=false)
133 ar << (hex_flag ? "x"+mcs_hex : to_utf8)
134 if to_s != ids #ids
\82ª
\95\94\95i
\82»
\82Ì
\82à
\82Ì
\82¾
\82Á
\82½
\82ç
\95\94\95i
\92Ç
\89Á
\82Í
\82µ
\82È
\82¢
139 ar << "x"+char.mcs_hex
150 return "("+ar.join("\t")+")"