Files
PowerShell/impl/getcpinfo.cpp
T

28 lines
623 B
C++
Raw Normal View History

2015-03-20 10:07:06 -07:00
#include "getcpinfo.h"
#include <unistd.h>
2015-04-03 11:06:30 -07:00
#include <string>
2015-03-20 10:07:06 -07:00
2015-04-03 11:06:30 -07:00
BOOL GetCPInfo(UINT codepage, CPINFO &cpinfo)
2015-03-20 10:07:06 -07:00
{
2015-04-09 15:23:57 -07:00
std::string test;
switch(codepage)
{
2015-03-20 10:07:06 -07:00
case 65000:
2015-04-09 15:23:57 -07:00
cpinfo.DefaultChar[0] = '?';
cpinfo.DefaultChar[1] = '0';
cpinfo.LeadByte[0] = '0';
cpinfo.LeadByte[1] = '0';
cpinfo.MaxCharSize = 5;
return TRUE;
2015-03-20 10:07:06 -07:00
case 65001:
2015-04-09 15:23:57 -07:00
cpinfo.DefaultChar[0] = '?';
cpinfo.DefaultChar[1] = '0';
cpinfo.LeadByte[0] = '0';
cpinfo.LeadByte[1] = '0';
cpinfo.MaxCharSize = 4;
return TRUE;
2015-03-20 10:07:06 -07:00
default:
2015-04-09 15:23:57 -07:00
return FALSE;
2015-03-20 10:07:06 -07:00
}
}