39 lines
1.2 KiB
C++
39 lines
1.2 KiB
C++
/***
|
|
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: Locale.hpp
|
|
Date: 2021-6-11
|
|
Author: Reece
|
|
***/
|
|
#pragma once
|
|
|
|
#define I_REALLY_NEED_WIDECHAR_PUBAPI
|
|
|
|
#if defined (VENDOR_GENERIC_MICROSOFT) || defined(VENDOR_CONSOLE_MICROSOFT)
|
|
// https://docs.microsoft.com/en-us/gaming/gdk/_content/gc/system/overviews/localization/supported_nls_apis
|
|
#define AU_HAS_MSFT_NATIONALLANGSUPPORT
|
|
// https://docs.microsoft.com/en-us/windows/win32/intl/code-page-identifiers
|
|
#define CP_LATIN_1 1252
|
|
#define CP_UTF_16 1200
|
|
#define CP_CHINESE 54936
|
|
#define CP_SHIFTJIS 932
|
|
// Ehhhh
|
|
// https://en.wikipedia.org/wiki/Code_page_936_(Microsoft_Windows);
|
|
// https://en.wikipedia.org/wiki/GBK_(character_encoding)
|
|
// `Since its initial release in 1993, GBK has been extended by Microsoft in Code page 936/1386, which was then extended into GBK 1.0`
|
|
#define CP_2312_LIMITED_GBK 936
|
|
#endif
|
|
|
|
#include "Encoding/EncoderAdapter.hpp"
|
|
#include "Encoding/EncoderIConv.hpp"
|
|
|
|
namespace Aurora::Locale
|
|
{
|
|
void Init();
|
|
|
|
ECodePage GetInternalCodePage();
|
|
AuString const &GetInternalCodePageString();
|
|
}
|
|
|
|
#include "Encoding/Encoding.hpp"
|