Skip to content

Instantly share code, notes, and snippets.

@miyohide
Created December 24, 2014 13:46
Show Gist options
  • Save miyohide/cdbfc4ac01272b51010b to your computer and use it in GitHub Desktop.
Save miyohide/cdbfc4ac01272b51010b to your computer and use it in GitHub Desktop.
nori 全角文字 サンプル
# coding: utf-8
require 'nori'
puts Nori.new.parse("<value> 全角文字 </value>") # => { "value"=>"全角文字 "}
puts Nori.new(parser: :rexml).parse("<value> 全角文字 </value>") # => {"value"=>" 全角文字 "}
puts Nori.new.parse("<value> zenkaku </value>") # => {"value"=>" zenkaku "}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment