mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 07:39:13 +02:00
+ added checks for certain code pages that should not be allowed to be set in Video.ActivateCodePage
git-svn-id: branches/unicodekvm@48910 -
This commit is contained in:
parent
2abcf62a95
commit
14af3cb5cb
@ -531,7 +531,15 @@ begin
|
||||
end;
|
||||
|
||||
procedure ActivateCodePage(CodePage: TSystemCodePage);
|
||||
const
|
||||
CP_UTF32LE=12000;
|
||||
CP_UTF32BE=12001;
|
||||
begin
|
||||
{ disallowed codepages (variable length), code points larger than an 8-bit byte, etc. }
|
||||
if (CodePage=CP_UTF8) or (CodePage=CP_UTF7) or
|
||||
(CodePage=CP_UTF16) or (CodePage=CP_UTF16BE) or
|
||||
(CodePage=CP_UTF32LE) or (CodePage=CP_UTF32BE) then
|
||||
exit;
|
||||
if EnhancedVideoInitialized then
|
||||
CurrentLegacy2EnhancedTranslationCodePage := CodePage;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user