AuroraRuntime/Source/Locale/Locale.hpp

39 lines
1.2 KiB
C++
Raw Normal View History

2021-06-27 21:25:29 +00:00
/***
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
2021-09-06 10:58:08 +00:00
#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"
2021-09-06 10:58:08 +00:00
2021-06-27 21:25:29 +00:00
namespace Aurora::Locale
{
void Init();
2021-09-06 10:58:08 +00:00
ECodePage GetInternalCodePage();
AuString const &GetInternalCodePageString();
}
#include "Encoding/Encoding.hpp"