From: davispuh@... Date: 2014-08-11T18:26:21+00:00 Subject: [ruby-core:64310] [ruby-trunk - Bug #10126] [Open] Dir.home encoding is incorrect on Windows Issue #10126 has been reported by D��vis Mos��ns. ---------------------------------------- Bug #10126: Dir.home encoding is incorrect on Windows https://bugs.ruby-lang.org/issues/10126 * 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 => # 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/