4#ifndef _Stroika_Foundation_Characters_CodePage_h_
5#define _Stroika_Foundation_Characters_CodePage_h_ 1
7#include "Stroika/Foundation/StroikaPreComp.h"
13#include "Stroika/Foundation/Common/Common.h"
14#include "Stroika/Foundation/Memory/Common.h"
43 namespace WellKnownCodePages {
54 constexpr CodePage kEasternEuropean = 1250;
61 constexpr CodePage kVietnamese = 1258;
63 constexpr CodePage kUNICODE_WIDE = 1200;
64 constexpr CodePage kUNICODE_WIDE_BIGENDIAN = 1201;
90 virtual const char*
what ()
const noexcept override;
95 nonvirtual
CodePage GetCodePage ()
const;
109 class CodePagesInstalled {
111 CodePagesInstalled ();
119 vector<CodePage> GetAll ();
125 bool IsCodePageAvailable (
CodePage cp);
128 vector<CodePage> fCodePages_;
135 class CodePagePrettyNameMapper {
137 static wstring GetName (
CodePage cp);
140 struct CodePageNames;
147 static CodePageNames GetCodePageNames ();
148 static void SetCodePageNames (
const CodePageNames& cmdNames);
149 static CodePageNames MakeDefaultCodePageNames ();
152 static CodePageNames sCodePageNames_;
154 struct CodePagePrettyNameMapper::CodePageNames {
155 wstring fUNICODE_WIDE;
156 wstring fUNICODE_WIDE_BIGENDIAN;
182#include "CodePage.inl"
virtual const char * what() const noexcept override
wstring GetCharsetString(CodePage cp)
Returns a character encoding name registered by the IANA - for the given CodePage.