static char buf[2 + 10 + 1]; sprintf (buf, "CP%u", GetACP ()); codeset = buf;
require 'win32api' GetACP = Win32API.new('kernel32.dll', 'GetACP', '', 'l') codeset = 'CP' + GetACP.call.to_s
Keyword(s):
References: