require 'json'
retuen_hash = {:"key ๑乛◡乛๑"=>"value ಡ◡ಡ"}
input_hash = {}
pattern = %r|[[\p{Alnum}][\p{Han}]]+|
retuen_hash.each do |k, v|
input_key = k.to_s.match(pattern).to_s
input_hash[input_key] = v
end
# input_hash #=>{"key"=>"value ಡ◡ಡ"}
json = JSON.generate(input_hash)
tmp_file_path = File.join(Dir.pwd, "input.json")
tem_file = File.new(tmp_file_path, "w+")
tem_file.syswrite(json)