1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
6 <title>Boost.Locale: Status of C++0x char16_t/char32_t support</title>
8 <link href="tabs.css" rel="stylesheet" type="text/css"/>
9 <link href="doxygen.css" rel="stylesheet" type="text/css" />
10 <link href="navtree.css" rel="stylesheet" type="text/css"/>
11 <script type="text/javascript" src="jquery.js"></script>
12 <script type="text/javascript" src="resize.js"></script>
13 <script type="text/javascript" src="navtree.js"></script>
14 <script type="text/javascript">
15 $(document).ready(initResizable);
21 <div id="top"><!-- do not remove this div! -->
25 <table cellspacing="0" cellpadding="0">
27 <tr style="height: 56px;">
29 <td id="projectlogo"><img alt="Logo" src="boost-small.png"/></td>
32 <td style="padding-left: 0.5em;">
33 <div id="projectname">Boost.Locale
46 <!-- Generated by Doxygen 1.7.6.1 -->
47 <div id="navrow1" class="tabs">
49 <li><a href="index.html"><span>Main Page</span></a></li>
50 <li><a href="modules.html"><span>Modules</span></a></li>
51 <li><a href="namespaces.html"><span>Namespaces</span></a></li>
52 <li><a href="annotated.html"><span>Classes</span></a></li>
53 <li><a href="files.html"><span>Files</span></a></li>
54 <li><a href="examples.html"><span>Examples</span></a></li>
58 <div id="side-nav" class="ui-resizable side-nav-resizable">
60 <div id="nav-tree-contents">
63 <div id="splitbar" style="-moz-user-select:none;"
64 class="ui-resizable-handle">
67 <script type="text/javascript">
68 initNavTree('status_of_cpp0x_characters_support.html','');
70 <div id="doc-content">
72 <div class="headertitle">
73 <div class="title">Status of C++0x char16_t/char32_t support </div> </div>
75 <div class="contents">
76 <div class="textblock"><p>The support of C++0x <code>char16_t</code> and <code>char32_t</code> is experimental, mostly does not work and not intended to be used in production with current latest compilers: GCC-4.5, MSVC10 till major compiler's flaws would be fixed.</p>
77 <h2><a class="anchor" id="status_of_cpp0x_characters_support_gnu"></a>
78 GNU GCC 4.5/C++0x Status</h2>
79 <p>GNU C++ compiler provides decent support of C++0x characters however:</p>
81 <li>Standard library does not install any std::locale::facets for this support so any attempt to format numbers using <code>char16_t</code> or <code>char32_t</code> streams would just fail.</li>
82 <li>Standard library misses specialization for required <code>char16_t/char32_t</code> locale facets, so "std" backends is not build-able as essential symbols missing, also <code>codecvt</code> facet can't be created as well.</li>
84 <h2><a class="anchor" id="status_of_cpp0x_characters_support_msvc"></a>
85 Visual Studio 2010 (MSVC10)/C++0x Status</h2>
86 <p>MSVC provides all required facets however:</p>
88 <li>Standard library does not provide installations of std::locale::id for these facets in DLL so it is not usable with <code>/MD</code>, <code>/MDd</code> compiler flags and requires static link of the runtime library.</li>
89 <li><code>char16_t</code> and <code>char32_t</code> are not distinct types but rather aliases of unsigned short and unsigned types which contradicts to C++0x requirements making it impossible to write <code>char16_t/char32_t</code> to stream and causing multiple faults. </li>
91 </div></div><!-- contents -->
93 <div id="nav-path" class="navpath">
95 <li class="navelem"><a class="el" href="index.html">Boost.Locale</a> </li>
96 <li class="navelem"><a class="el" href="appendix.html">Appendix</a> </li>
99 © Copyright 2009-2012 Artyom Beilis, Distributed under the <a href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License</a>, Version 1.0.