coinbase / terraform-landscape

Improve Terraform's plan output to be easier to read and understand
Apache License 2.0
1.58k stars 111 forks source link

Support non ASCII attribute #91

Closed dozen closed 5 years ago

dozen commented 5 years ago

String#undump is a function that does the reverse of String#dump, so we expect String#dump output.

Multibyte characters in terraform_pran results are not escaped. They differ from the results of String#dump (String#dump converts non ASCII characters to Unicode escape sequences).

example:

puts 'hello, 世界'.dump              # => "hello, \u4E16\u754C"
puts '"hello, \u4E16\u754C"'.undump # => hello, 世界
puts '"hello, 世界"'
# Traceback (most recent call last):
#   1: from sample.rb:3:in `<main>'
# sample.rb:3:in `undump': non-ASCII character detected (RuntimeError)
sds commented 5 years ago

Thanks for the fix, @dozen!