-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathsjis_utf16.hpp
42 lines (35 loc) · 1.24 KB
/
sjis_utf16.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#pragma once
//=====================================================================//
/*! @file
@brief SJIS, UTF16 変換
@author 平松邦仁 ([email protected])
@copyright Copyright (C) 2016, 2017 Kunihito Hiramatsu @n
Released under the MIT license @n
https://github.com/hirakuni45/RX/blob/master/LICENSE
*/
//=====================================================================//
#include <cstdint>
namespace utils {
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
/*!
@brief UTF-16 から SJIS コードを求めるマップの生成
*/
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
void init_utf16_to_sjis();
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
/*!
@brief SJIS から UTF-16 コードを求める
@param[in] sjis SJIS コード
@return UTF16 コード
*/
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
uint16_t sjis_to_utf16(uint16_t sjis);
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
/*!
@brief UTF-16 から SJIS コードを求める
@param[in] utf16 UTF-16 コード
@return SJIS コード
*/
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
uint16_t utf16_to_sjis(uint16_t utf16);
};