codepage=(p1)
public
Show source
/*
* call-seq:
* WIN32OLE.codepage = CP
*
* Sets current codepage.
* WIN32OLE.codepage = WIN32OLE::CP_UTF8
*/
static VALUE
fole_s_set_code_page(self, vcp)
VALUE self;
VALUE vcp;
{
UINT cp = FIX2INT(vcp);
switch(cp) {
case CP_ACP:
case CP_OEMCP:
case CP_MACCP:
case CP_THREAD_ACP:
case CP_SYMBOL:
case CP_UTF7:
case CP_UTF8:
cWIN32OLE_cp = cp;
break;
default:
rb_raise(eWIN32OLE_RUNTIME_ERROR, "codepage should be WIN32OLE::CP_ACP, WIN32OLE::CP_OEMCP, WIN32OLE::CP_MACCP, WIN32OLE::CP_THREAD_ACP, WIN32OLE::CP_SYMBOL, WIN32OLE::CP_UTF7, WIN32OLE::CP_UTF8");
break;
}
/*
* Should this method return old codepage?
*/
return Qnil;
}