mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
29 lines
623 B
C++
29 lines
623 B
C++
#include "getcpinfo.h"
|
|
#include <unistd.h>
|
|
#include <string>
|
|
|
|
BOOL GetCPInfo(UINT codepage, CPINFO &cpinfo)
|
|
{
|
|
std::string test;
|
|
switch(codepage)
|
|
{
|
|
case 65000:
|
|
cpinfo.DefaultChar[0] = '?';
|
|
cpinfo.DefaultChar[1] = '0';
|
|
cpinfo.LeadByte[0] = '0';
|
|
cpinfo.LeadByte[1] = '0';
|
|
cpinfo.MaxCharSize = 5;
|
|
return TRUE;
|
|
case 65001:
|
|
cpinfo.DefaultChar[0] = '?';
|
|
cpinfo.DefaultChar[1] = '0';
|
|
cpinfo.LeadByte[0] = '0';
|
|
cpinfo.LeadByte[1] = '0';
|
|
cpinfo.MaxCharSize = 4;
|
|
return TRUE;
|
|
default:
|
|
return FALSE;
|
|
}
|
|
}
|
|
|