mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/win32ole/test_win32ole.rb (test_s_codepage_changed):
FileSystemObject only supports ANSI or UTF-16LE encoding. Patch by h.shirosaki (Hiroshi Shirosaki) [ruby-trunk - Bug #6650] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
067b6e8237
commit
263cd01a31
2 changed files with 10 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
Wed Jul 4 19:13:15 2012 Masaki Suketa <masaki.suketa@nifty.ne.jp>
|
||||||
|
|
||||||
|
* test/win32ole/test_win32ole.rb (test_s_codepage_changed):
|
||||||
|
FileSystemObject only supports ANSI or UTF-16LE encoding.
|
||||||
|
Patch by h.shirosaki (Hiroshi Shirosaki) [ruby-trunk - Bug #6650]
|
||||||
|
|
||||||
|
|
||||||
Wed Jul 4 11:52:12 2012 NAKAMURA Usaku <usa@ruby-lang.org>
|
Wed Jul 4 11:52:12 2012 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
* gc.c (ATOMIC_SIZE_*): 64bit Windows support.
|
* gc.c (ATOMIC_SIZE_*): 64bit Windows support.
|
||||||
|
|
|
@ -351,8 +351,9 @@ if defined?(WIN32OLE)
|
||||||
|
|
||||||
WIN32OLE.codepage = cp
|
WIN32OLE.codepage = cp
|
||||||
file = fso.opentextfile(fname, 2, true)
|
file = fso.opentextfile(fname, 2, true)
|
||||||
|
test_str = [0x3042].pack("U*").encode("UTF-16LE")
|
||||||
begin
|
begin
|
||||||
file.write [0x3042].pack("U*").force_encoding("UTF-16")
|
file.write test_str.force_encoding("UTF-16")
|
||||||
ensure
|
ensure
|
||||||
file.close
|
file.close
|
||||||
end
|
end
|
||||||
|
@ -360,7 +361,7 @@ if defined?(WIN32OLE)
|
||||||
open(fname, "r:ascii-8bit") {|ifs|
|
open(fname, "r:ascii-8bit") {|ifs|
|
||||||
str = ifs.read
|
str = ifs.read
|
||||||
}
|
}
|
||||||
assert_equal("\343\201\202", str)
|
assert_equal(test_str.force_encoding("ascii-8bit"), str)
|
||||||
|
|
||||||
# This test fail if codepage 20932 (euc) is not installed.
|
# This test fail if codepage 20932 (euc) is not installed.
|
||||||
begin
|
begin
|
||||||
|
|
Loading…
Reference in a new issue