# \[Bug #2752\] File path encoding on mac os x and windows

**URL:** <https://www.ruby-forum.com/t/bug-2752-file-path-encoding-on-mac-os-x-and-windows/183618>\
**Category:** Development\
**Created:** [February 17, 2010, 1:55pm UTC](https://www.ruby-forum.com/t/bug-2752-file-path-encoding-on-mac-os-x-and-windows/183618 "2010-02-17T13:55:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yusuke\_E](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/f08c70/32.png) [@Yusuke\_E](https://www.ruby-forum.com/u/Yusuke_E)\
**Post date:** [February 17, 2010, 1:55pm UTC](https://www.ruby-forum.com/t/bug-2752-file-path-encoding-on-mac-os-x-and-windows/183618/1 "2010-02-17T13:55:44Z")

</div>

Bug #2752: File path encoding on mac os x and windows  
[http://redmine.ruby-lang.org/issues/show/2752](http://redmine.ruby-lang.org/issues/show/2752)

e$B5/I\<\<Te(B: Yusuke E.  
e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Urgent  
e$BC4Ev\<Te(B: Yui NARUSE, e$B%+%F%4%je(B: M17N, Target version: 1.9.2  
ruby -v: ruby 1.9.2dev (2010-02-17 trunk 26700) [i686-linux]

e$B@.@%$5$se(B  
e$B1sF#$G$9!#e(B

File#path e$B$N%(%s%3!\<%G%#%s%0$O!"e(BFile.new  
e$B$KM?$($i$l$?J8;zNs$Ne(B  
e$B%(%s%3!\<%G%#%s%0$rJ];}$7$^$9$+!)e(B

File.new(path).path.encoding.should == path.encoding

Linux e$B$G$OJ];}$9$k$h$&$G$9!#e(Bmac os x e$B$He(B windows  
e$B$G$OL$7hDj$@$He(B  
e$B$$$&OC$J$N$G!"K:$l$J$$$h$&$K%A%1%C%H$K$7$F$_$-$^$9!#e(B  
1.9.2 e$B$^$G$K7h$a$k$Y$-$@$H;W$&$N$G!"e(Burgent e$B$K$7$F$_$-$^$9!#e(B

–  
Yusuke ENDOH [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![Yusuke\_E](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/f08c70/32.png) [@Yusuke\_E](https://www.ruby-forum.com/u/Yusuke_E)\
**Post date:** [March 6, 2010, 6:23pm UTC](https://www.ruby-forum.com/t/bug-2752-file-path-encoding-on-mac-os-x-and-windows/183618/2 "2010-03-06T18:23:07Z")

</div>

e$B%A%1%C%He(B #2752 e$B$,99?7$5$l$^$7$?!#e(B (by Yui NARUSE)

e$B%9%F!\<%?%9e(B Opene$B$+$ie(BClosede$B$KJQ99e(B  
e$B?JD=e(B % 0e$B$+$ie(B100e$B$KJQ99e(B

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

* * *

[http://redmine.ruby-lang.org/issues/show/2752](http://redmine.ruby-lang.org/issues/show/2752)
