Module: Jpmobile::Mobile::GoogleEmoticon
- Included in:
- Android, AndroidTablet
- Defined in:
- lib/jpmobile/mobile/google_emoticon.rb
Instance Method Summary collapse
-
#apply_filter? ⇒ Boolean
Jpmobile::Filter を適用する.
-
#apply_params_filter? ⇒ Boolean
Jpmobile::ParamsFilter を適用する.
- #to_external(str, content_type, charset) ⇒ Object
-
#to_internal(str) ⇒ Object
文字コード変換.
Instance Method Details
#apply_filter? ⇒ Boolean
Jpmobile::Filter を適用する
4 5 6 |
# File 'lib/jpmobile/mobile/google_emoticon.rb', line 4 def apply_filter? Jpmobile.config.smart_phone_emoticon_compatibility end |
#apply_params_filter? ⇒ Boolean
Jpmobile::ParamsFilter を適用する
9 10 11 |
# File 'lib/jpmobile/mobile/google_emoticon.rb', line 9 def apply_params_filter? Jpmobile.config.smart_phone_emoticon_compatibility end |
#to_external(str, content_type, charset) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/jpmobile/mobile/google_emoticon.rb', line 21 def to_external(str, content_type, charset) # UTF-8を数値参照に str = Jpmobile::Emoticon.utf8_to_unicodecr(str) str = Jpmobile::Emoticon.unicodecr_to_external(str, Jpmobile::Emoticon::CONVERSION_TABLE_TO_GOOGLE_EMOTICON, false) [str, charset] end |
#to_internal(str) ⇒ Object
文字コード変換
14 15 16 17 18 19 |
# File 'lib/jpmobile/mobile/google_emoticon.rb', line 14 def to_internal(str) # Google絵文字を数値参照に変換 str = Jpmobile::Emoticon.external_to_unicodecr_google(Jpmobile::Util.utf8(str)) # 数値参照を UTF-8 に変換 Jpmobile::Emoticon.unicodecr_to_utf8(str) end |