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"> 3<head> 4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> 5<meta http-equiv="X-UA-Compatible" content="IE=9"/> 6<meta name="generator" content="Doxygen 1.8.6"/> 7<title>Boost.Locale: Status of C++11 char16_t/char32_t support</title> 8<link href="tabs.css" rel="stylesheet" type="text/css"/> 9<script type="text/javascript" src="jquery.js"></script> 10<script type="text/javascript" src="dynsections.js"></script> 11<link href="navtree.css" rel="stylesheet" type="text/css"/> 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); 16 $(window).load(resizeHeight); 17</script> 18<link href="doxygen.css" rel="stylesheet" type="text/css" /> 19</head> 20<body> 21<div id="top"><!-- do not remove this div, it is closed by doxygen! --> 22<div id="titlearea"> 23<table cellspacing="0" cellpadding="0"> 24 <tbody> 25 <tr style="height: 56px;"> 26 <td id="projectlogo"><img alt="Logo" src="boost-small.png"/></td> 27 <td style="padding-left: 0.5em;"> 28 <div id="projectname">Boost.Locale 29 </div> 30 </td> 31 </tr> 32 </tbody> 33</table> 34</div> 35<!-- end header part --> 36<!-- Generated by Doxygen 1.8.6 --> 37 <div id="navrow1" class="tabs"> 38 <ul class="tablist"> 39 <li><a href="index.html"><span>Main Page</span></a></li> 40 <li class="current"><a href="pages.html"><span>Related Pages</span></a></li> 41 <li><a href="modules.html"><span>Modules</span></a></li> 42 <li><a href="namespaces.html"><span>Namespaces</span></a></li> 43 <li><a href="annotated.html"><span>Classes</span></a></li> 44 <li><a href="files.html"><span>Files</span></a></li> 45 <li><a href="examples.html"><span>Examples</span></a></li> 46 </ul> 47 </div> 48</div><!-- top --> 49<div id="side-nav" class="ui-resizable side-nav-resizable"> 50 <div id="nav-tree"> 51 <div id="nav-tree-contents"> 52 <div id="nav-sync" class="sync"></div> 53 </div> 54 </div> 55 <div id="splitbar" style="-moz-user-select:none;" 56 class="ui-resizable-handle"> 57 </div> 58</div> 59<script type="text/javascript"> 60$(document).ready(function(){initNavTree('status_of_cpp0x_characters_support.html','');}); 61</script> 62<div id="doc-content"> 63<div class="header"> 64 <div class="headertitle"> 65<div class="title">Status of C++11 char16_t/char32_t support </div> </div> 66</div><!--header--> 67<div class="contents"> 68<div class="textblock"><p>The support of C++11 <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> 69<h1><a class="anchor" id="status_of_cpp0x_characters_support_gnu"></a> 70GNU GCC 4.5/C++11 Status</h1> 71<p>GNU C++ compiler provides decent support of C++11 characters however:</p> 72<ol type="1"> 73<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> 74<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> 75</ol> 76<h1><a class="anchor" id="status_of_cpp0x_characters_support_msvc"></a> 77Visual Studio 2010 (MSVC10)/C++11 Status</h1> 78<p>MSVC provides all required facets however:</p> 79<ol type="1"> 80<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> 81<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++11 requirements making it impossible to write <code>char16_t/char32_t</code> to stream and causing multiple faults.</li> 82</ol> 83<p>If you want to build or test Boost.Locale with C++11 char16_t and char32_t support you should pass <code>cxxflags="-DBOOST_LOCALE_ENABLE_CHAR32_T -DBOOST_LOCALE_ENABLE_CHAR16_T"</code> to <code>b2</code> during build and define <code>BOOST_LOCALE_ENABLE_CHAR32_T</code> and <code>BOOST_LOCALE_ENABLE_CHAR32_T</code> when using Boost.Locale </p> 84</div></div><!-- contents --> 85</div><!-- doc-content --> 86 87 <li class="footer"> 88© 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. 89 </li> 90 </ul> 91 </div> 92</body> 93</html> 94