Project

General

Profile

Actions

Bug #6156

closed

String#tr fails on UTF-16

Added by john_firebaugh (John Firebaugh) about 12 years ago. Updated about 12 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin11.3.0]
Backport:
[ruby-core:43335]

Description

"b".encode("utf-16le").tr("a-z".encode("utf-16le"), "*".encode("utf-16le"))
ArgumentError: invalid byte sequence in UTF-16LE
from (irb):91:in tr' from (irb):91 from /Users/john/.rvm/rubies/ruby-1.9.3-p125/bin/irb:16:in '

Expected result is UTF-16LE "*".

Actions #1

Updated by nobu (Nobuyoshi Nakada) about 12 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r35069.
John, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


Actions

Also available in: Atom PDF

Like0
Like0