HexEdit/HexEditView.cpp
void CHexEditView::SetCodePage(int cp)
{
	if (cp == code_page_)    // same as current
		return;

	code_page_ = cp;
	if (code_page_ == CP_UTF8)
	{
		max_cp_bytes_ = 0;  // UTF-8 is handled differently - set to zero to detect accidental use of normal CP code
		return;
	}

	CPINFOEX cpie;
	VERIFY(GetCPInfoEx(code_page_, 0, &cpie));
	max_cp_bytes_ = cpie.MaxCharSize;
}
// Set which code page is used when display_.char_set == CHARSET_CODEPAGE

Set which code page is used when display_.char_set == CHARSET_CODEPAGE
Set which code page is used when display_ . char_set == CHARSET_CODEPAGE
void CHexEditView::SetCodePage(int cp)
{
	if (cp == code_page_)    
		return;
	code_page_ = cp;
	if (code_page_ == CP_UTF8)
	{
		max_cp_bytes_ = 0;  
		return;
	}
	CPINFOEX cpie;
	VERIFY(GetCPInfoEx(code_page_, 0, &cpie));
	max_cp_bytes_ = cpie.MaxCharSize;
}
void CHexEditView :: SetCodePage ( int cp ) { if ( cp == code_page_ ) return ; code_page_ = cp ; if ( code_page_ == CP_UTF8 ) { max_cp_bytes_ = 0 ; return ; } CPINFOEX cpie ; VERIFY ( GetCPInfoEx ( code_page_ , 0 , & cpie ) ) ; max_cp_bytes_ = cpie . MaxCharSize ; }
Set which code page is used when display_.char_set == CHARSET_CODEPAGE
Set which code page is used when display_ . char_set == CHARSET_CODEPAGE
// same as current
 // UTF-8 is handled differently - set to zero to detect accidental use of normal CP code
