mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/win32ole/win32ole.c (ole_init_cp): initialize WIN32OLE.codepage
according to Encoding.default_internal and Encoding.default_external. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d245085630
commit
b7212ba643
2 changed files with 18 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
|||
Wed Oct 8 20:59:52 2008 Masaki Suketa <masaki.suketa@nifty.ne.jp>
|
||||
|
||||
* ext/win32ole/win32ole.c (ole_init_cp): initialize WIN32OLE.codepage
|
||||
according to Encoding.default_internal and
|
||||
Encoding.default_external.
|
||||
|
||||
Wed Oct 8 17:02:21 2008 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* ext/json/lib/json/pure/generator.rb (utf8_to_json):
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
|
||||
#define WC2VSTR(x) ole_wc2vstr((x), TRUE)
|
||||
|
||||
#define WIN32OLE_VERSION "1.3.3"
|
||||
#define WIN32OLE_VERSION "1.3.4"
|
||||
|
||||
typedef HRESULT (STDAPICALLTYPE FNCOCREATEINSTANCEEX)
|
||||
(REFCLSID, IUnknown*, DWORD, COSERVERINFO*, DWORD, MULTI_QI*);
|
||||
|
@ -961,7 +961,10 @@ ole_init_cp()
|
|||
{
|
||||
UINT cp;
|
||||
rb_encoding *encdef;
|
||||
encdef = rb_default_internal_encoding();
|
||||
if (!encdef) {
|
||||
encdef = rb_default_external_encoding();
|
||||
}
|
||||
cp = ole_encoding2cp(encdef);
|
||||
if (code_page_installed(cp)) {
|
||||
cWIN32OLE_cp = cp;
|
||||
|
@ -2909,8 +2912,13 @@ code_page_installed(UINT cp)
|
|||
* WIN32OLE.codepage = CP
|
||||
*
|
||||
* Sets current codepage.
|
||||
* The WIN32OLE.codepage is initialized according to
|
||||
* Encoding.default_internal.
|
||||
* If Encoding.default_internal is nil then WIN32OLE.codepage
|
||||
* is initialized according to Encoding.default_external.
|
||||
*
|
||||
* WIN32OLE.codepage = WIN32OLE::CP_UTF8
|
||||
* WIN32OLE.codepage = 20932
|
||||
* WIN32OLE.codepage = 65001
|
||||
*/
|
||||
static VALUE
|
||||
fole_s_set_code_page(VALUE self, VALUE vcp)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue