[ruby-core:112918] [Ruby master Bug#19532] Handling of 6-byte codepoints in left_adjust_char_head in CESU-8 encoding is broken

Issue #19532 has been reported by Eregon (Benoit Daloze). ---------------------------------------- Bug #19532: Handling of 6-byte codepoints in left_adjust_char_head in CESU-8 encoding is broken https://bugs.ruby-lang.org/issues/19532 * Author: Eregon (Benoit Daloze) * Status: Open * Priority: Normal * Backport: 2.7: UNKNOWN, 3.0: REQUIRED, 3.1: REQUIRED, 3.2: REQUIRED ---------------------------------------- Fix in https://github.com/ruby/ruby/pull/7510 -- https://bugs.ruby-lang.org/

Issue #19532 has been updated by nobu (Nobuyoshi Nakada). The change itself looks fine, but also I’m for obsoleting CESU-8. ---------------------------------------- Bug #19532: Handling of 6-byte codepoints in left_adjust_char_head in CESU-8 encoding is broken https://bugs.ruby-lang.org/issues/19532#change-102463 * Author: Eregon (Benoit Daloze) * Status: Open * Priority: Normal * ruby -v: ruby 3.2.1 (2023-02-08 revision 31819e82c8) [x86_64-linux] * Backport: 2.7: UNKNOWN, 3.0: REQUIRED, 3.1: REQUIRED, 3.2: REQUIRED ---------------------------------------- ```ruby irb(main):001:0> "\u{10000}".encode("cesu-8").chop => "\xED\xA0\x80" ``` But it should be `""`. Fix in https://github.com/ruby/ruby/pull/7510 -- https://bugs.ruby-lang.org/

Issue #19532 has been updated by usa (Usaku NAKAMURA). Backport changed from 2.7: UNKNOWN, 3.0: REQUIRED, 3.1: REQUIRED, 3.2: REQUIRED to 2.7: UNKNOWN, 3.0: REQUIRED, 3.1: DONE, 3.2: REQUIRED ruby_3_1 0275614ba213dfb6f05743a16f65623bc3b6e274 merged revision(s) 2c8f287. ---------------------------------------- Bug #19532: Handling of 6-byte codepoints in left_adjust_char_head in CESU-8 encoding is broken https://bugs.ruby-lang.org/issues/19532#change-103685 * Author: Eregon (Benoit Daloze) * Status: Open * Priority: Normal * ruby -v: ruby 3.2.1 (2023-02-08 revision 31819e82c8) [x86_64-linux] * Backport: 2.7: UNKNOWN, 3.0: REQUIRED, 3.1: DONE, 3.2: REQUIRED ---------------------------------------- ```ruby irb(main):001:0> "\u{10000}".encode("cesu-8").chop => "\xED\xA0\x80" ``` But it should be `""`. Fix in https://github.com/ruby/ruby/pull/7510 -- https://bugs.ruby-lang.org/

Issue #19532 has been updated by nagachika (Tomoyuki Chikanaga). Backport changed from 2.7: UNKNOWN, 3.0: REQUIRED, 3.1: DONE, 3.2: REQUIRED to 2.7: UNKNOWN, 3.0: REQUIRED, 3.1: DONE, 3.2: DONE ruby_3_2 4e0653db3315e9e7859e38e0995e2b9900471370 merged revision(s) 2c8f2871a8aeff592369a993b1d69557160cfa61. ---------------------------------------- Bug #19532: Handling of 6-byte codepoints in left_adjust_char_head in CESU-8 encoding is broken https://bugs.ruby-lang.org/issues/19532#change-103955 * Author: Eregon (Benoit Daloze) * Status: Closed * Priority: Normal * ruby -v: ruby 3.2.1 (2023-02-08 revision 31819e82c8) [x86_64-linux] * Backport: 2.7: UNKNOWN, 3.0: REQUIRED, 3.1: DONE, 3.2: DONE ---------------------------------------- ```ruby irb(main):001:0> "\u{10000}".encode("cesu-8").chop => "\xED\xA0\x80" ``` But it should be `""`. Fix in https://github.com/ruby/ruby/pull/7510 -- https://bugs.ruby-lang.org/
participants (4)
-
Eregon (Benoit Daloze)
-
nagachika (Tomoyuki Chikanaga)
-
nobu (Nobuyoshi Nakada)
-
usa (Usaku NAKAMURA)