[#66126] Creation/Conversion methods/functions table for Ruby types — SASADA Koichi <ko1@...>
Hi,
5 messages
2014/11/07
[#66248] [ruby-trunk - Feature #10423] [PATCH] opt_str_lit*: avoid literal string allocations — normalperson@...
Issue #10423 has been updated by Eric Wong.
3 messages
2014/11/13
[#66595] [ruby-trunk - Bug #10557] [Open] Block not given when the argument is a string — bartosz@...
Issue #10557 has been reported by Bartosz Kopinski.
3 messages
2014/11/30
[ruby-core:66164] [ruby-trunk - Bug #10126] Dir.home encoding is incorrect on Windows
From:
davispuh@...
Date:
2014-11-10 00:54:26 UTC
List:
ruby-core #66164
Issue #10126 has been updated by Dāvis Mosāns.
Looks like this have been fixed in Ruby 2.1
Testing with ruby 2.1.4p265 (2014-10-27 revision 48166) [x64-mingw32]
```
dir = Dir.home
puts dir
=> C:/Users/Dāvis
puts dir.encoding
=> #<Encoding:Windows-1257>
```
----------------------------------------
Bug #10126: Dir.home encoding is incorrect on Windows
https://bugs.ruby-lang.org/issues/10126#change-49863
* Author: Dāvis Mosāns
* Status: Open
* Priority: Normal
* Assignee: cruby-windows
* Category: platform/windows
* Target version:
* ruby -v: 2.0.0p481
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
Dir.home string itself is actually returned encoded in cp775 (no matter what consoles encoding is)
but encoding information is as windows default encoding.
For example, if my home directory is C:\Users\Dāvis and windows default encoding 1257 with cosnole's encoding as 1252
```
dir = Dir.home
=> "C:/Users/D\x83vis"
dir.encoding
=> #<Encoding:Windows-1257>
puts dir
=> C:/Users/D�vis
dir.force_encoding('cp775')
puts dir
=> C:/Users/Dāvis
```
As can see, x83 is ā character in 775 encoding.
--
https://bugs.ruby-lang.org/