Issue #13162 has been updated by Tsuyoshi Sawada.


OK. I now realize that this was not a bug but a feature. Please close.

----------------------------------------
Bug #13162: tr does not recognize multi-byte characters correctly
https://bugs.ruby-lang.org/issues/13162#change-62697

* Author: Tsuyoshi Sawada
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 2.3.3
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
This looks as expected:

```
"\\".tr('\\', '\') # => "\"
```

but this doesn't:


```
"\\".tr("\\¥'", "\¥'") # => "\\"
```

I confirmed the strings are UTF-8.



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>