This project is closed and read-only.
Actions
Backport #6104
closedFile.join always returns as ASCII-8BIT regardless of input encoding
Backport #6104:
File.join always returns as ASCII-8BIT regardless of input encoding
Status:
Closed
Assignee:
Description
I can show lots of different variations, but the simplest proof is:
irb(main):001:0> File.join('foo'.encode('utf-8')).encoding
=> #Encoding:ASCII-8BIT
Updated by luislavena (Luis Lavena) over 14 years ago
- Category set to core
- Assignee set to usa (Usaku NAKAMURA)
Patrick,
Actually as I described in #5297, the error is not File.join but the result of Dir.glob coming using the current Encoding.default_external and not the filesystem one:
V:\>chcp 1252
Active code page: 1252
V:\>ruby -e "puts Dir.glob('*').first.encoding"
Windows-1252
V:\>chcp 437
Active code page: 437
V:\>ruby -e "puts Dir.glob('*').first.encoding"
IBM437
While File.expand_path is more smart about that.
Updated by luislavena (Luis Lavena) over 14 years ago
Updated by phasis68 (Heesob Park) over 14 years ago
I think this issue was solved with changeset [ruby-core:40338] [Bug #5483]">r33525.
Updated by naruse (Yui NARUSE) over 14 years ago
- Tracker changed from Bug to Backport
- Project changed from Ruby to 13
- Category deleted (
core) - Target version deleted (
1.9.3)
Updated by naruse (Yui NARUSE) over 14 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r34865.
Patrick, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
merge revision(s) r33525: [Backport #6104]
* file.c (rb_file_join): honor input encodings than ASCII-8BIT.
[ruby-core:40338] [Bug #5483]
Actions