aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/index.html
blob: 41b4683b4d93d30bc5de326e89189687ddf83ceb (plain) (blame)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>winapi_utf8: winapi-utf8</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">winapi_utf8
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="PageDoc"><div class="header">
  <div class="headertitle">
<div class="title">winapi-utf8 </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p><a class="anchor" id="md_README"></a></p>
<p><a href="https://github.com/egor-tensin/winapi-utf8/actions/workflows/ci.yml"><img src="https://github.com/egor-tensin/winapi-utf8/actions/workflows/ci.yml/badge.svg" alt="CI" style="pointer-events: none;" class="inline"/></a></p>
<p>UTF-8 &lt;-&gt; UTF-16 conversion functions, mainly to be used with WinAPI.</p>
<h1><a class="anchor" id="autotoc_md0"></a>
Usage</h1>
<p>Include it in your CMake project and link to the <code>winapi_utf8</code> target. Use the <code><a class="el" href="utf8_8hpp.html#ae643a038e8194c1f0d14bdf9edcafcb7">narrow()</a></code> and <code><a class="el" href="utf8_8hpp.html#a4b174d9e77015c16d3e3ab6ad95000b6">widen()</a></code> functions to convert to UTF-8 and UTF-16 respectively: </p><pre class="fragment">#include &lt;winapi/utf8.hpp&gt;

winapi::narrow(u"Привет"); // Returns the UTF-8 representation
winapi::widen(u8"Привет"); // Returns the UTF-16 representation
</pre><p> See the various convenience overloads of these function in the <a href="https://egor-tensin.github.io/winapi-utf8/utf8_8hpp.html">online documentation</a>.</p>
<h1><a class="anchor" id="autotoc_md1"></a>
Development</h1>
<p>Build using CMake. Depends on Boost.Test. The project is Windows-only, so building with either MSVC or MinGW-w64 is required.</p>
<p>There's a Makefile with useful shortcuts to build the project in the build/ directory (defaults to building with MinGW-w64): </p><pre class="fragment">make deps
make build
make test
</pre> <h1><a class="anchor" id="autotoc_md2"></a>
Documentation</h1>
<p>Build &amp; display the documentation using </p><pre class="fragment">make docs
</pre><p> View the online documentation at <a href="https://egor-tensin.github.io/winapi-utf8/">https://egor-tensin.github.io/winapi-utf8/</a>.</p>
<h1><a class="anchor" id="autotoc_md3"></a>
License</h1>
<p>Distributed under the MIT License. See <a href="LICENSE.txt">LICENSE.txt</a> for details. </p>
</div></div><!-- PageDoc -->
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>