Some File methods seem to have trouble with multi-byte characters in filenames
------------------------------------------------------------------------------
Key: JRUBY-5161
URL: http://jira.codehaus.org/browse/JRUBY-5161
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.5.3, JRuby 1.5.2, JRuby 1.5.1
Environment: OS X Snow Leopard, Java 1.6
Reporter: Daniel Lucraft
File.directory? raises an error when given a multi-byte character filename:
filename = "/Users/danlucraft/Redcar/scratchpad/테스트.py"
p filename
p File.file?(filename)
p File.directory?(filename)
Gives the output:
"/Users/danlucraft/Redcar/scratchpad/테스트.py"
true
Errno::ENOENT: No such file or directory -
/Users/danlucraft/Redcar/scratchpad/íì¤í¸.py
This DOESN'T happen in jirb, but DOES happen in my application. I have set
$KCODE="U" and Jruby is running in 1.8 mode.
This also happens with File.stat(filename).mtime.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email