Actions
Bug #6566
closedJSON.dump can generate invalid UTF-8 sequence
Description
=begin
Look, in the following code JSON.dump outputs a sequence invalid as UTF-8.
-- encoding: utf-8 --¶
require 'json'
IO.popen('hexdump -C', 'w') do |fp|
JSON.dump(["\xea"], fp)
end
RFC4627 says that to encode JSON as a Unicode is a "SHALL". So this is an RFC violation.
=end
Files
Actions
Like0
Like0Like0Like0Like0Like0