Skip to content

Commit

Permalink
* win32/file.c (code_page): use cp1252 instead of cp20127 as US-ASCII.
Browse files Browse the repository at this point in the history
  fix [ruby-core:53079] [Bug #7996]
  reported and patched by mmeltner (Michael Meltner).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
unak committed Mar 29, 2013
1 parent 33be01c commit b7d708c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
Sat Mar 30 03:58:00 2013 NAKAMURA Usaku <usa@ruby-lang.org>

* win32/file.c (code_page): use cp1252 instead of cp20127 as US-ASCII.
fix [ruby-core:53079] [Bug #7996]
reported and patched by mmeltner (Michael Meltner).

Sat Mar 30 03:49:21 2013 NAKAMURA Usaku <usa@ruby-lang.org>

* win32/win32.c (wrename): use MoveFileExW instead of MoveFileW,
because the latter fails on cross device file move of some
environments.
fix [ruby-core:53492] [Bug #8109]
reported by mitchellh (Mitchell Hashimoto)
reported by mitchellh (Mitchell Hashimoto).

Fri Mar 29 22:09:46 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>

Expand Down
4 changes: 2 additions & 2 deletions win32/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,9 @@ code_page(rb_encoding *enc)
names_ary = rb_funcall(encoding, names, 0);
}

/* map US-ASCII and ASCII-8bit as code page 20127 (us-ascii) */
/* map US-ASCII and ASCII-8bit as code page 1252 (us-ascii) */
if (enc == rb_usascii_encoding() || enc == rb_ascii8bit_encoding()) {
UINT code_page = 20127;
UINT code_page = 1252;
rb_hash_aset(rb_code_page, name_key, INT2FIX(code_page));
return code_page;
}
Expand Down

0 comments on commit b7d708c

Please sign in to comment.