Actions
Bug #5855
closedinconsistent treatment of 8 bit characters in US-ASCII
Bug #5855:
inconsistent treatment of 8 bit characters in US-ASCII
Description
=begin
Does Ruby allow 8 bit characters (127-255) in a US-ASCII encoded string, or not?
"\u{80}".encode("US-ASCII") #=> Encoding::UndefinedConversionError
0x80.chr("US-ASCII") #=> "\x80" (US-ASCII encoding)
"".encode("US-ASCII") << 128 #=> "\x80" (US-ASCII encoding)
"".encode("US-ASCII") << 128.chr #=> "\x80" (ASCII-8BIT encoding)
=end
Actions