diff options
author | Jari Vetoniemi <jari.vetoniemi@indooratlas.com> | 2020-03-16 18:49:26 +0900 |
---|---|---|
committer | Jari Vetoniemi <jari.vetoniemi@indooratlas.com> | 2020-03-30 00:39:06 +0900 |
commit | fcbf63e62c627deae76c1b8cb8c0876c536ed811 (patch) | |
tree | 64cb17de3f41a2b6fef2368028fbd00349946994 /jni/ruby/enc/trans/emoji.trans |
Fresh start
Diffstat (limited to 'jni/ruby/enc/trans/emoji.trans')
-rw-r--r-- | jni/ruby/enc/trans/emoji.trans | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/jni/ruby/enc/trans/emoji.trans b/jni/ruby/enc/trans/emoji.trans new file mode 100644 index 0000000..25d9fdd --- /dev/null +++ b/jni/ruby/enc/trans/emoji.trans @@ -0,0 +1,36 @@ +#include "transcode_data.h" + +<% + require 'emoji-exchange-tbl' + + nomap_table = [ + ["{00-7f}", :nomap], + ["{c2-df}{80-bf}", :nomap0], + ["e0{a0-bf}{80-bf}", :nomap0], + ["{e1-ec}{80-bf}{80-bf}", :nomap0], + ["ed{80-9f}{80-bf}", :nomap0], + ["{ee-ef}{80-bf}{80-bf}", :nomap0], + ["f0{90-bf}{80-bf}{80-bf}", :nomap0], + ["{f1-f3}{80-bf}{80-bf}{80-bf}", :nomap0], + ["f4{80-8f}{80-bf}{80-bf}", :nomap0], + ] + + companies = %w(DoCoMo KDDI SoftBank Unicode) + companies.each do |from_company| + companies.each do |to_company| + next if from_company == to_company + from_encoding = (from_company == "Unicode") ? "UTF-8" : "UTF8-"+from_company + to_encoding = (to_company == "Unicode") ? "UTF-8" : "UTF8-"+to_company + + strict_mapping = EMOJI_EXCHANGE_TBL[from_encoding][to_encoding] + transcode_tblgen(from_encoding, to_encoding, strict_mapping + nomap_table, nil) + end + end +%> + +<%= transcode_generated_code %> + +TRANS_INIT(emoji) +{ +<%= transcode_register_code %> +} |