ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:50712] [ruby-trunk - Bug #1685] Some windows unicode path issues remain
       [not found] <redmine.issue-1685.20090624193610@ruby-lang.org>
@ 2012-12-09 12:40 ` mame (Yusuke Endoh)
  2013-02-18 12:07 ` [ruby-core:52440] " mame (Yusuke Endoh)
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: mame (Yusuke Endoh) @ 2012-12-09 12:40 UTC (permalink / raw
  To: ruby-core


Issue #1685 has been updated by mame (Yusuke Endoh).

Description updated

Usa-san, what's the status?

-- 
Yusuke Endoh <mame@tsg.ne.jp>
----------------------------------------
Bug #1685: Some windows unicode path issues remain
https://bugs.ruby-lang.org/issues/1685#change-34559

Author: spatulasnout (B Kelly)
Status: Assigned
Priority: Normal
Assignee: usa (Usaku NAKAMURA)
Category: M17N
Target version: 2.0.0
ruby -v: ruby 1.9.2dev (2009-06-24) [i386-mswin32_71]


=begin
 Hi,
 
 I see some nice progress has been made in unicode path
 handling on windows.
 
 The following tests are not exhaustive, but do reveal some
 remaining issues.
 
 Everything below "NOT WORKING" fails in one way or another.
 
 Regards,
 
 Bill
 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 # encoding: UTF-8
 
 # Test unicode path/dir handling on windows
 
 require 'test/unit'
 
 class TestUnicodeFilenamesAndPaths < Test::Unit::TestCase
   def setup
     tmpdir = ENV['TEMP'] || "C:/TEMP"
     Dir.chdir tmpdir
     puts Dir.pwd
     testdir = "ruby_unicode_test"
     Dir.mkdir testdir unless test ?d, testdir
     Dir.chdir testdir
     puts Dir.pwd
   end
   
   def test_unicode_paths
     fname_resume = "R\xC3\xA9sum\xC3\xA9".force_encoding("UTF-8")
     fname_chinese = "\u52ec\u52ee\u52f1\u52f2.txt"
     dname_chinese = "\u52ec\u52ee\u52f1\u52f2"
 
     assert_equal( "UTF-8", fname_resume.encoding.name )
     File.open(fname_resume, "w") {|io| io.puts "Hello, World"}
     
     assert_equal( "UTF-8", fname_chinese.encoding.name )
     File.open(fname_chinese, "w") {|io| io.puts "Hello, World"}
     
     dat = File.read(fname_chinese)
     assert_equal( "Hello, World\n", dat )
     
     files = Dir["*"]
     assert( files.include? fname_resume )
     assert( files.include? fname_chinese )
 
 # NOT WORKING:
     Dir.rmdir dname_chinese rescue nil
     Dir.mkdir dname_chinese
     test ?d, dname_chinese
     Dir.chdir dname_chinese
     cwd = Dir.pwd
     assert( cwd[(-dname_chinese.length)..-1] == dname_chinese )
     Dir.chdir ".."
 
     x = File.stat(fname_resume)
     x = File.stat(fname_chinese)
     x = File.stat(dname_chinese)
     
     assert( File.exist? fname_resume )
     assert( File.exist? fname_chinese )
     assert( test(?f, fname_resume) )
     assert( test(?f, fname_chinese) )
 
     files = Dir[fname_resume]
     assert_equal( fname_resume, files.first )
     files = Dir[fname_chinese]
     assert_equal( fname_chinese, files.first )
     files = Dir[dname_chinese]
     assert_equal( dname_chinese, files.first )
   end  
 end
=end



-- 
http://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ruby-core:52440] [ruby-trunk - Bug #1685] Some windows unicode path issues remain
       [not found] <redmine.issue-1685.20090624193610@ruby-lang.org>
  2012-12-09 12:40 ` [ruby-core:50712] [ruby-trunk - Bug #1685] Some windows unicode path issues remain mame (Yusuke Endoh)
@ 2013-02-18 12:07 ` mame (Yusuke Endoh)
  2014-04-03 14:07 ` [ruby-core:61838] " thomas
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: mame (Yusuke Endoh) @ 2013-02-18 12:07 UTC (permalink / raw
  To: ruby-core


Issue #1685 has been updated by mame (Yusuke Endoh).

Target version changed from 2.0.0 to next minor

Usa-san, what's the status?

-- 
Yusuke Endoh <mame@tsg.ne.jp>

----------------------------------------
Bug #1685: Some windows unicode path issues remain
https://bugs.ruby-lang.org/issues/1685#change-36501

Author: spatulasnout (B Kelly)
Status: Assigned
Priority: Normal
Assignee: usa (Usaku NAKAMURA)
Category: M17N
Target version: next minor
ruby -v: ruby 1.9.2dev (2009-06-24) [i386-mswin32_71]


=begin
 Hi,
 
 I see some nice progress has been made in unicode path
 handling on windows.
 
 The following tests are not exhaustive, but do reveal some
 remaining issues.
 
 Everything below "NOT WORKING" fails in one way or another.
 
 Regards,
 
 Bill
 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 # encoding: UTF-8
 
 # Test unicode path/dir handling on windows
 
 require 'test/unit'
 
 class TestUnicodeFilenamesAndPaths < Test::Unit::TestCase
   def setup
     tmpdir = ENV['TEMP'] || "C:/TEMP"
     Dir.chdir tmpdir
     puts Dir.pwd
     testdir = "ruby_unicode_test"
     Dir.mkdir testdir unless test ?d, testdir
     Dir.chdir testdir
     puts Dir.pwd
   end
   
   def test_unicode_paths
     fname_resume = "R\xC3\xA9sum\xC3\xA9".force_encoding("UTF-8")
     fname_chinese = "\u52ec\u52ee\u52f1\u52f2.txt"
     dname_chinese = "\u52ec\u52ee\u52f1\u52f2"
 
     assert_equal( "UTF-8", fname_resume.encoding.name )
     File.open(fname_resume, "w") {|io| io.puts "Hello, World"}
     
     assert_equal( "UTF-8", fname_chinese.encoding.name )
     File.open(fname_chinese, "w") {|io| io.puts "Hello, World"}
     
     dat = File.read(fname_chinese)
     assert_equal( "Hello, World\n", dat )
     
     files = Dir["*"]
     assert( files.include? fname_resume )
     assert( files.include? fname_chinese )
 
 # NOT WORKING:
     Dir.rmdir dname_chinese rescue nil
     Dir.mkdir dname_chinese
     test ?d, dname_chinese
     Dir.chdir dname_chinese
     cwd = Dir.pwd
     assert( cwd[(-dname_chinese.length)..-1] == dname_chinese )
     Dir.chdir ".."
 
     x = File.stat(fname_resume)
     x = File.stat(fname_chinese)
     x = File.stat(dname_chinese)
     
     assert( File.exist? fname_resume )
     assert( File.exist? fname_chinese )
     assert( test(?f, fname_resume) )
     assert( test(?f, fname_chinese) )
 
     files = Dir[fname_resume]
     assert_equal( fname_resume, files.first )
     files = Dir[fname_chinese]
     assert_equal( fname_chinese, files.first )
     files = Dir[dname_chinese]
     assert_equal( dname_chinese, files.first )
   end  
 end
=end



-- 
http://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ruby-core:61838] [ruby-trunk - Bug #1685] Some windows unicode path issues remain
       [not found] <redmine.issue-1685.20090624193610@ruby-lang.org>
  2012-12-09 12:40 ` [ruby-core:50712] [ruby-trunk - Bug #1685] Some windows unicode path issues remain mame (Yusuke Endoh)
  2013-02-18 12:07 ` [ruby-core:52440] " mame (Yusuke Endoh)
@ 2014-04-03 14:07 ` thomas
  2014-04-04  5:23   ` [ruby-core:61853] " "Martin J. Dürst"
  2014-04-04 10:38 ` [ruby-core:61854] " duerst
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 7+ messages in thread
From: thomas @ 2014-04-03 14:07 UTC (permalink / raw
  To: ruby-core

Issue #1685 has been updated by Thomas Thomassen.


B Kelly wrote:
> =begin
>  Thanks to your finding a solution for Dir.entries, it seems
>  we are approaching nearly 100% unicode path capability for
>  win32!
> =end

In Ruby 2.0 there appear to still be several issues with Ruby and Unicode characters in filenames. Dir.entries fail, load and require fail. __FILE__ has the wrong encoding. I see some things slated for Ruby 2.2, but not everything.

----------------------------------------
Bug #1685: Some windows unicode path issues remain
https://bugs.ruby-lang.org/issues/1685#change-46061

* Author: B Kelly
* Status: Assigned
* Priority: Normal
* Assignee: Usaku NAKAMURA
* Category: M17N
* Target version: next minor
* ruby -v: ruby 1.9.2dev (2009-06-24) [i386-mswin32_71]
* Backport: 
----------------------------------------
=begin
 Hi,
 
 I see some nice progress has been made in unicode path
 handling on windows.
 
 The following tests are not exhaustive, but do reveal some
 remaining issues.
 
 Everything below "NOT WORKING" fails in one way or another.
 
 Regards,
 
 Bill
 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 # encoding: UTF-8
 
 # Test unicode path/dir handling on windows
 
 require 'test/unit'
 
 class TestUnicodeFilenamesAndPaths < Test::Unit::TestCase
   def setup
     tmpdir = ENV['TEMP'] || "C:/TEMP"
     Dir.chdir tmpdir
     puts Dir.pwd
     testdir = "ruby_unicode_test"
     Dir.mkdir testdir unless test ?d, testdir
     Dir.chdir testdir
     puts Dir.pwd
   end
   
   def test_unicode_paths
     fname_resume = "R\xC3\xA9sum\xC3\xA9".force_encoding("UTF-8")
     fname_chinese = "\u52ec\u52ee\u52f1\u52f2.txt"
     dname_chinese = "\u52ec\u52ee\u52f1\u52f2"
 
     assert_equal( "UTF-8", fname_resume.encoding.name )
     File.open(fname_resume, "w") {|io| io.puts "Hello, World"}
     
     assert_equal( "UTF-8", fname_chinese.encoding.name )
     File.open(fname_chinese, "w") {|io| io.puts "Hello, World"}
     
     dat = File.read(fname_chinese)
     assert_equal( "Hello, World\n", dat )
     
     files = Dir["*"]
     assert( files.include? fname_resume )
     assert( files.include? fname_chinese )
 
 # NOT WORKING:
     Dir.rmdir dname_chinese rescue nil
     Dir.mkdir dname_chinese
     test ?d, dname_chinese
     Dir.chdir dname_chinese
     cwd = Dir.pwd
     assert( cwd[(-dname_chinese.length)..-1] == dname_chinese )
     Dir.chdir ".."
 
     x = File.stat(fname_resume)
     x = File.stat(fname_chinese)
     x = File.stat(dname_chinese)
     
     assert( File.exist? fname_resume )
     assert( File.exist? fname_chinese )
     assert( test(?f, fname_resume) )
     assert( test(?f, fname_chinese) )
 
     files = Dir[fname_resume]
     assert_equal( fname_resume, files.first )
     files = Dir[fname_chinese]
     assert_equal( fname_chinese, files.first )
     files = Dir[dname_chinese]
     assert_equal( dname_chinese, files.first )
   end  
 end
=end


---Files--------------------------------
spatulasnout-unicode-mkdir-diffs.txt (3.56 KB)
test_io_unicode_paths.rb (925 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ruby-core:61853] Re: [ruby-trunk - Bug #1685] Some windows unicode path issues remain
  2014-04-03 14:07 ` [ruby-core:61838] " thomas
@ 2014-04-04  5:23   ` "Martin J. Dürst"
  0 siblings, 0 replies; 7+ messages in thread
From: "Martin J. Dürst" @ 2014-04-04  5:23 UTC (permalink / raw
  To: Ruby developers, thomas

On 2014/04/03 23:07, thomas@thomthom.net wrote:
> Issue #1685 has been updated by Thomas Thomassen.

> In Ruby 2.0 there appear to still be several issues with Ruby and Unicode characters in filenames. Dir.entries fail, load and require fail. __FILE__ has the wrong encoding. I see some things slated for Ruby 2.2, but not everything.

If you know of anything that's not yet in Ruby 2.2, please tell us, best 
by opening a bug for each issue.

Regards,   Martin.


> ----------------------------------------
> Bug #1685: Some windows unicode path issues remain
> https://bugs.ruby-lang.org/issues/1685#change-46061
>
> * Author: B Kelly
> * Status: Assigned
> * Priority: Normal
> * Assignee: Usaku NAKAMURA
> * Category: M17N
> * Target version: next minor
> * ruby -v: ruby 1.9.2dev (2009-06-24) [i386-mswin32_71]
> * Backport:
> ----------------------------------------
> =begin
>   Hi,
>
>   I see some nice progress has been made in unicode path
>   handling on windows.
>
>   The following tests are not exhaustive, but do reveal some
>   remaining issues.
>
>   Everything below "NOT WORKING" fails in one way or another.
>
>   Regards,
>
>   Bill
>
>   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   # encoding: UTF-8
>
>   # Test unicode path/dir handling on windows
>
>   require 'test/unit'
>
>   class TestUnicodeFilenamesAndPaths < Test::Unit::TestCase
>     def setup
>       tmpdir = ENV['TEMP'] || "C:/TEMP"
>       Dir.chdir tmpdir
>       puts Dir.pwd
>       testdir = "ruby_unicode_test"
>       Dir.mkdir testdir unless test ?d, testdir
>       Dir.chdir testdir
>       puts Dir.pwd
>     end
>
>     def test_unicode_paths
>       fname_resume = "R\xC3\xA9sum\xC3\xA9".force_encoding("UTF-8")
>       fname_chinese = "\u52ec\u52ee\u52f1\u52f2.txt"
>       dname_chinese = "\u52ec\u52ee\u52f1\u52f2"
>
>       assert_equal( "UTF-8", fname_resume.encoding.name )
>       File.open(fname_resume, "w") {|io| io.puts "Hello, World"}
>
>       assert_equal( "UTF-8", fname_chinese.encoding.name )
>       File.open(fname_chinese, "w") {|io| io.puts "Hello, World"}
>
>       dat = File.read(fname_chinese)
>       assert_equal( "Hello, World\n", dat )
>
>       files = Dir["*"]
>       assert( files.include? fname_resume )
>       assert( files.include? fname_chinese )
>
>   # NOT WORKING:
>       Dir.rmdir dname_chinese rescue nil
>       Dir.mkdir dname_chinese
>       test ?d, dname_chinese
>       Dir.chdir dname_chinese
>       cwd = Dir.pwd
>       assert( cwd[(-dname_chinese.length)..-1] == dname_chinese )
>       Dir.chdir ".."
>
>       x = File.stat(fname_resume)
>       x = File.stat(fname_chinese)
>       x = File.stat(dname_chinese)
>
>       assert( File.exist? fname_resume )
>       assert( File.exist? fname_chinese )
>       assert( test(?f, fname_resume) )
>       assert( test(?f, fname_chinese) )
>
>       files = Dir[fname_resume]
>       assert_equal( fname_resume, files.first )
>       files = Dir[fname_chinese]
>       assert_equal( fname_chinese, files.first )
>       files = Dir[dname_chinese]
>       assert_equal( dname_chinese, files.first )
>     end
>   end
> =end
>
>
> ---Files--------------------------------
> spatulasnout-unicode-mkdir-diffs.txt (3.56 KB)
> test_io_unicode_paths.rb (925 Bytes)
>
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ruby-core:61854] [ruby-trunk - Bug #1685] Some windows unicode path issues remain
       [not found] <redmine.issue-1685.20090624193610@ruby-lang.org>
                   ` (2 preceding siblings ...)
  2014-04-03 14:07 ` [ruby-core:61838] " thomas
@ 2014-04-04 10:38 ` duerst
  2014-04-04 11:45 ` [ruby-core:61856] " thomas
  2014-04-07 18:50 ` [ruby-core:61897] [ruby-trunk - Bug #1685] [Closed] " usa
  5 siblings, 0 replies; 7+ messages in thread
From: duerst @ 2014-04-04 10:38 UTC (permalink / raw
  To: ruby-core

Issue #1685 has been updated by Martin Dürst.


 On 2014/04/03 23:07, thomas@thomthom.net wrote:
 > Issue #1685 has been updated by Thomas Thomassen.
 
 > In Ruby 2.0 there appear to still be several issues with Ruby and Unicode characters in filenames. Dir.entries fail, load and require fail. __FILE__ has the wrong encoding. I see some things slated for Ruby 2.2, but not everything.
 
 If you know of anything that's not yet in Ruby 2.2, please tell us, best 
 by opening a bug for each issue.
 
 Regards,   Martin.
 
 
 > ----------------------------------------
 > Bug #1685: Some windows unicode path issues remain
 > https://bugs.ruby-lang.org/issues/1685#change-46061
 >
 > * Author: B Kelly
 > * Status: Assigned
 > * Priority: Normal
 > * Assignee: Usaku NAKAMURA
 > * Category: M17N
 > * Target version: next minor
 > * ruby -v: ruby 1.9.2dev (2009-06-24) [i386-mswin32_71]
 > * Backport:
 > ----------------------------------------
 > =begin
 >   Hi,
 >
 >   I see some nice progress has been made in unicode path
 >   handling on windows.
 >
 >   The following tests are not exhaustive, but do reveal some
 >   remaining issues.
 >
 >   Everything below "NOT WORKING" fails in one way or another.
 >
 >   Regards,
 >
 >   Bill
 >
 >   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 >   # encoding: UTF-8
 >
 >   # Test unicode path/dir handling on windows
 >
 >   require 'test/unit'
 >
 >   class TestUnicodeFilenamesAndPaths < Test::Unit::TestCase
 >     def setup
 >       tmpdir = ENV['TEMP'] || "C:/TEMP"
 >       Dir.chdir tmpdir
 >       puts Dir.pwd
 >       testdir = "ruby_unicode_test"
 >       Dir.mkdir testdir unless test ?d, testdir
 >       Dir.chdir testdir
 >       puts Dir.pwd
 >     end
 >
 >     def test_unicode_paths
 >       fname_resume = "R\xC3\xA9sum\xC3\xA9".force_encoding("UTF-8")
 >       fname_chinese = "\u52ec\u52ee\u52f1\u52f2.txt"
 >       dname_chinese = "\u52ec\u52ee\u52f1\u52f2"
 >
 >       assert_equal( "UTF-8", fname_resume.encoding.name )
 >       File.open(fname_resume, "w") {|io| io.puts "Hello, World"}
 >
 >       assert_equal( "UTF-8", fname_chinese.encoding.name )
 >       File.open(fname_chinese, "w") {|io| io.puts "Hello, World"}
 >
 >       dat = File.read(fname_chinese)
 >       assert_equal( "Hello, World\n", dat )
 >
 >       files = Dir["*"]
 >       assert( files.include? fname_resume )
 >       assert( files.include? fname_chinese )
 >
 >   # NOT WORKING:
 >       Dir.rmdir dname_chinese rescue nil
 >       Dir.mkdir dname_chinese
 >       test ?d, dname_chinese
 >       Dir.chdir dname_chinese
 >       cwd = Dir.pwd
 >       assert( cwd[(-dname_chinese.length)..-1] == dname_chinese )
 >       Dir.chdir ".."
 >
 >       x = File.stat(fname_resume)
 >       x = File.stat(fname_chinese)
 >       x = File.stat(dname_chinese)
 >
 >       assert( File.exist? fname_resume )
 >       assert( File.exist? fname_chinese )
 >       assert( test(?f, fname_resume) )
 >       assert( test(?f, fname_chinese) )
 >
 >       files = Dir[fname_resume]
 >       assert_equal( fname_resume, files.first )
 >       files = Dir[fname_chinese]
 >       assert_equal( fname_chinese, files.first )
 >       files = Dir[dname_chinese]
 >       assert_equal( dname_chinese, files.first )
 >     end
 >   end
 > =end
 >
 >
 > ---Files--------------------------------
 > spatulasnout-unicode-mkdir-diffs.txt (3.56 KB)
 > test_io_unicode_paths.rb (925 Bytes)
 >
 >

----------------------------------------
Bug #1685: Some windows unicode path issues remain
https://bugs.ruby-lang.org/issues/1685#change-46070

* Author: B Kelly
* Status: Assigned
* Priority: Normal
* Assignee: Usaku NAKAMURA
* Category: M17N
* Target version: next minor
* ruby -v: ruby 1.9.2dev (2009-06-24) [i386-mswin32_71]
* Backport: 
----------------------------------------
=begin
 Hi,
 
 I see some nice progress has been made in unicode path
 handling on windows.
 
 The following tests are not exhaustive, but do reveal some
 remaining issues.
 
 Everything below "NOT WORKING" fails in one way or another.
 
 Regards,
 
 Bill
 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 # encoding: UTF-8
 
 # Test unicode path/dir handling on windows
 
 require 'test/unit'
 
 class TestUnicodeFilenamesAndPaths < Test::Unit::TestCase
   def setup
     tmpdir = ENV['TEMP'] || "C:/TEMP"
     Dir.chdir tmpdir
     puts Dir.pwd
     testdir = "ruby_unicode_test"
     Dir.mkdir testdir unless test ?d, testdir
     Dir.chdir testdir
     puts Dir.pwd
   end
   
   def test_unicode_paths
     fname_resume = "R\xC3\xA9sum\xC3\xA9".force_encoding("UTF-8")
     fname_chinese = "\u52ec\u52ee\u52f1\u52f2.txt"
     dname_chinese = "\u52ec\u52ee\u52f1\u52f2"
 
     assert_equal( "UTF-8", fname_resume.encoding.name )
     File.open(fname_resume, "w") {|io| io.puts "Hello, World"}
     
     assert_equal( "UTF-8", fname_chinese.encoding.name )
     File.open(fname_chinese, "w") {|io| io.puts "Hello, World"}
     
     dat = File.read(fname_chinese)
     assert_equal( "Hello, World\n", dat )
     
     files = Dir["*"]
     assert( files.include? fname_resume )
     assert( files.include? fname_chinese )
 
 # NOT WORKING:
     Dir.rmdir dname_chinese rescue nil
     Dir.mkdir dname_chinese
     test ?d, dname_chinese
     Dir.chdir dname_chinese
     cwd = Dir.pwd
     assert( cwd[(-dname_chinese.length)..-1] == dname_chinese )
     Dir.chdir ".."
 
     x = File.stat(fname_resume)
     x = File.stat(fname_chinese)
     x = File.stat(dname_chinese)
     
     assert( File.exist? fname_resume )
     assert( File.exist? fname_chinese )
     assert( test(?f, fname_resume) )
     assert( test(?f, fname_chinese) )
 
     files = Dir[fname_resume]
     assert_equal( fname_resume, files.first )
     files = Dir[fname_chinese]
     assert_equal( fname_chinese, files.first )
     files = Dir[dname_chinese]
     assert_equal( dname_chinese, files.first )
   end  
 end
=end


---Files--------------------------------
spatulasnout-unicode-mkdir-diffs.txt (3.56 KB)
test_io_unicode_paths.rb (925 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ruby-core:61856] [ruby-trunk - Bug #1685] Some windows unicode path issues remain
       [not found] <redmine.issue-1685.20090624193610@ruby-lang.org>
                   ` (3 preceding siblings ...)
  2014-04-04 10:38 ` [ruby-core:61854] " duerst
@ 2014-04-04 11:45 ` thomas
  2014-04-07 18:50 ` [ruby-core:61897] [ruby-trunk - Bug #1685] [Closed] " usa
  5 siblings, 0 replies; 7+ messages in thread
From: thomas @ 2014-04-04 11:45 UTC (permalink / raw
  To: ruby-core

Issue #1685 has been updated by Thomas Thomassen.


Martin Dürst wrote:
>  If you know of anything that's not yet in Ruby 2.2, please tell us, best 
>  by opening a bug for each issue.

I've been setting up tests and running them through Ruby 2.2 I find some are fixed but there is still several issues related to file handling. We'll be filing issues for what we have uncovered.

----------------------------------------
Bug #1685: Some windows unicode path issues remain
https://bugs.ruby-lang.org/issues/1685#change-46072

* Author: B Kelly
* Status: Assigned
* Priority: Normal
* Assignee: Usaku NAKAMURA
* Category: M17N
* Target version: next minor
* ruby -v: ruby 1.9.2dev (2009-06-24) [i386-mswin32_71]
* Backport: 
----------------------------------------
=begin
 Hi,
 
 I see some nice progress has been made in unicode path
 handling on windows.
 
 The following tests are not exhaustive, but do reveal some
 remaining issues.
 
 Everything below "NOT WORKING" fails in one way or another.
 
 Regards,
 
 Bill
 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 # encoding: UTF-8
 
 # Test unicode path/dir handling on windows
 
 require 'test/unit'
 
 class TestUnicodeFilenamesAndPaths < Test::Unit::TestCase
   def setup
     tmpdir = ENV['TEMP'] || "C:/TEMP"
     Dir.chdir tmpdir
     puts Dir.pwd
     testdir = "ruby_unicode_test"
     Dir.mkdir testdir unless test ?d, testdir
     Dir.chdir testdir
     puts Dir.pwd
   end
   
   def test_unicode_paths
     fname_resume = "R\xC3\xA9sum\xC3\xA9".force_encoding("UTF-8")
     fname_chinese = "\u52ec\u52ee\u52f1\u52f2.txt"
     dname_chinese = "\u52ec\u52ee\u52f1\u52f2"
 
     assert_equal( "UTF-8", fname_resume.encoding.name )
     File.open(fname_resume, "w") {|io| io.puts "Hello, World"}
     
     assert_equal( "UTF-8", fname_chinese.encoding.name )
     File.open(fname_chinese, "w") {|io| io.puts "Hello, World"}
     
     dat = File.read(fname_chinese)
     assert_equal( "Hello, World\n", dat )
     
     files = Dir["*"]
     assert( files.include? fname_resume )
     assert( files.include? fname_chinese )
 
 # NOT WORKING:
     Dir.rmdir dname_chinese rescue nil
     Dir.mkdir dname_chinese
     test ?d, dname_chinese
     Dir.chdir dname_chinese
     cwd = Dir.pwd
     assert( cwd[(-dname_chinese.length)..-1] == dname_chinese )
     Dir.chdir ".."
 
     x = File.stat(fname_resume)
     x = File.stat(fname_chinese)
     x = File.stat(dname_chinese)
     
     assert( File.exist? fname_resume )
     assert( File.exist? fname_chinese )
     assert( test(?f, fname_resume) )
     assert( test(?f, fname_chinese) )
 
     files = Dir[fname_resume]
     assert_equal( fname_resume, files.first )
     files = Dir[fname_chinese]
     assert_equal( fname_chinese, files.first )
     files = Dir[dname_chinese]
     assert_equal( dname_chinese, files.first )
   end  
 end
=end


---Files--------------------------------
spatulasnout-unicode-mkdir-diffs.txt (3.56 KB)
test_io_unicode_paths.rb (925 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ruby-core:61897] [ruby-trunk - Bug #1685] [Closed] Some windows unicode path issues remain
       [not found] <redmine.issue-1685.20090624193610@ruby-lang.org>
                   ` (4 preceding siblings ...)
  2014-04-04 11:45 ` [ruby-core:61856] " thomas
@ 2014-04-07 18:50 ` usa
  5 siblings, 0 replies; 7+ messages in thread
From: usa @ 2014-04-07 18:50 UTC (permalink / raw
  To: ruby-core

Issue #1685 has been updated by Usaku NAKAMURA.

Status changed from Assigned to Closed

This ticket is too old and too various problems.
Now Thomas investigates many things and is making some new tickets. (Thank you!)
Please refer to them from now on.

----------------------------------------
Bug #1685: Some windows unicode path issues remain
https://bugs.ruby-lang.org/issues/1685#change-46105

* Author: B Kelly
* Status: Closed
* Priority: Normal
* Assignee: Usaku NAKAMURA
* Category: M17N
* Target version: next minor
* ruby -v: ruby 1.9.2dev (2009-06-24) [i386-mswin32_71]
* Backport: 
----------------------------------------
=begin
 Hi,
 
 I see some nice progress has been made in unicode path
 handling on windows.
 
 The following tests are not exhaustive, but do reveal some
 remaining issues.
 
 Everything below "NOT WORKING" fails in one way or another.
 
 Regards,
 
 Bill
 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 # encoding: UTF-8
 
 # Test unicode path/dir handling on windows
 
 require 'test/unit'
 
 class TestUnicodeFilenamesAndPaths < Test::Unit::TestCase
   def setup
     tmpdir = ENV['TEMP'] || "C:/TEMP"
     Dir.chdir tmpdir
     puts Dir.pwd
     testdir = "ruby_unicode_test"
     Dir.mkdir testdir unless test ?d, testdir
     Dir.chdir testdir
     puts Dir.pwd
   end
   
   def test_unicode_paths
     fname_resume = "R\xC3\xA9sum\xC3\xA9".force_encoding("UTF-8")
     fname_chinese = "\u52ec\u52ee\u52f1\u52f2.txt"
     dname_chinese = "\u52ec\u52ee\u52f1\u52f2"
 
     assert_equal( "UTF-8", fname_resume.encoding.name )
     File.open(fname_resume, "w") {|io| io.puts "Hello, World"}
     
     assert_equal( "UTF-8", fname_chinese.encoding.name )
     File.open(fname_chinese, "w") {|io| io.puts "Hello, World"}
     
     dat = File.read(fname_chinese)
     assert_equal( "Hello, World\n", dat )
     
     files = Dir["*"]
     assert( files.include? fname_resume )
     assert( files.include? fname_chinese )
 
 # NOT WORKING:
     Dir.rmdir dname_chinese rescue nil
     Dir.mkdir dname_chinese
     test ?d, dname_chinese
     Dir.chdir dname_chinese
     cwd = Dir.pwd
     assert( cwd[(-dname_chinese.length)..-1] == dname_chinese )
     Dir.chdir ".."
 
     x = File.stat(fname_resume)
     x = File.stat(fname_chinese)
     x = File.stat(dname_chinese)
     
     assert( File.exist? fname_resume )
     assert( File.exist? fname_chinese )
     assert( test(?f, fname_resume) )
     assert( test(?f, fname_chinese) )
 
     files = Dir[fname_resume]
     assert_equal( fname_resume, files.first )
     files = Dir[fname_chinese]
     assert_equal( fname_chinese, files.first )
     files = Dir[dname_chinese]
     assert_equal( dname_chinese, files.first )
   end  
 end
=end


---Files--------------------------------
spatulasnout-unicode-mkdir-diffs.txt (3.56 KB)
test_io_unicode_paths.rb (925 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-04-07 18:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <redmine.issue-1685.20090624193610@ruby-lang.org>
2012-12-09 12:40 ` [ruby-core:50712] [ruby-trunk - Bug #1685] Some windows unicode path issues remain mame (Yusuke Endoh)
2013-02-18 12:07 ` [ruby-core:52440] " mame (Yusuke Endoh)
2014-04-03 14:07 ` [ruby-core:61838] " thomas
2014-04-04  5:23   ` [ruby-core:61853] " "Martin J. Dürst"
2014-04-04 10:38 ` [ruby-core:61854] " duerst
2014-04-04 11:45 ` [ruby-core:61856] " thomas
2014-04-07 18:50 ` [ruby-core:61897] [ruby-trunk - Bug #1685] [Closed] " usa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).