File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -457,15 +457,15 @@ for one byte in the input or output string.
457457 "foo ".unpack('A4') # => ["foo"]
458458 "foo".unpack('A4') # => ["foo"]
459459
460- russian = "\u{442 435 441 442}" # => "тест"
461- russian .size # => 4
462- russian .bytesize # => 8
463- [russian ].pack('A') # => "\xD1 "
464- [russian ].pack('A*') # => "\xD1\ x82\xD0\xB5\xD1\ x81\xD1\x82 "
465- russian .unpack('A') # => ["\xD1 "]
466- russian .unpack('A2') # => ["\xD1\x82 "]
467- russian .unpack('A4') # => ["\xD1\x82\xD0\xB5 "]
468- russian .unpack('A*') # => ["\xD1\ x82\xD0\xB5\xD1\ x81\xD1\x82 "]
460+ japanese = 'こんにちは'
461+ japanese .size # => 5
462+ japanese .bytesize # => 15
463+ [japanese ].pack('A') # => "\xE3 "
464+ [japanese ].pack('A*') # => "\xE3\x81\x93\xE3\ x82\x93\xE3\x81\xAB\xE3\ x81\xA1\xE3\x81\xAF "
465+ japanese .unpack('A') # => ["\xE3 "]
466+ japanese .unpack('A2') # => ["\xE3\x81 "]
467+ japanese .unpack('A4') # => ["\xE3\x81\x93\xE3 "]
468+ japanese .unpack('A*') # => ["\xE3\x81\x93\xE3\ x82\x93\xE3\x81\xAB\xE3\ x81\xA1\xE3\x81\xAF "]
469469
470470- <tt>'a'</tt> - Arbitrary binary string (null padded; count is width):
471471
You can’t perform that action at this time.
0 commit comments