| Branch | Travis | Appveyor | Github | codecov.io | Documentation |
|---|---|---|---|---|---|
| master | |||||
| develop |
Library for cross-platform, unicode aware programming.
The library provides an implementation of standard C and C++ library functions, such that their inputs are UTF-8 aware on Windows without requiring to use the Wide API.
Distributed under the Boost Software License, Version 1.0.
Instead of using the standard library functions use the corresponding member of Boost.Nowide with the same name.
On Linux those are (mostly) aliases for the std ones, but on Windows they accept UTF-8 as input and use the wide API for the underlying functionality.
Examples:
std::ifstream -> boost::nowide::ifstreamstd::fopen -> boost::nowide::fopenstd::fclose -> boost::nowide::fclosestd::getenv -> boost::nowide::getenvstd::putenv -> boost::nowide::putenvstd::cout -> boost::nowide::coutTo also convert your input arguments to UTF-8 on Windows use:
int main(int argc, char **argv)
{
boost::nowide::args _(argc, argv); // Must use an instance!
...
}
See the Documentation for details.
Compile and install the Boost super project the usual way via ./b2.
The headers and library will then be available together with all other Boost libraries.
From within CMake you can then use find_package(boost_nowide) and link against Boost::nowide.
Boost.Nowide fully supports CMake.
So you can use add_subdirectory("path-to-boost-nowide-repo") and link your project against the target Boost::nowide.
You can also pre-compile and install Boost.Nowide via the usual workflow:
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local
make install
A CMake-Config file will be installed alongside Boost.Nowide so find_package(boost_nowide) does work out-of the box
(provided it was installed into a "standard" location or its INSTALL_PREFIX was added to CMAKE_PREFIX_PATH).
Boost.Nowide integrates with Boost.Filesystem:
boost::nowide::nowide_filesystem() to imbue UTF-8 into Boost.Filesystem (for use by boost::filesystem::path) such that narrow strings passed into Boost.Filesystem are treated as UTF-8 on Windows[nowide] tag at the beginning of the subject line.<h1>Boost.Nowide</h1> <table> <thead> <tr> <th align="left">Branch</th> <th align="left">Travis</th> <th align="left">Appveyor</th> <th align="left">Github</th> <th align="left">codecov.io</th> <th align="left">Documentation</th> </tr> </thead> <tbody> <tr> <td align="left"><a href="https://github.com/boostorg/nowide/tree/master">master</a></td> <td align="left"><a href="https://travis-ci.com/boostorg/nowide"><img src="https://travis-ci.com/boostorg/nowide.svg?branch=master" alt="Build Status" /></a></td> <td align="left"><a href="https://ci.appveyor.com/project/Flamefire/nowide-fr98b/branch/master"><img src="https://ci.appveyor.com/api/projects/status/w5sywrekwd66say4/branch/master?svg=true" alt="Build status" /></a></td> <td align="left"><img src="https://github.com/boostorg/nowide/workflows/CI%20Tests/badge.svg?branch=master" alt="" /></td> <td align="left"><a href="https://codecov.io/gh/boostorg/nowide/branch/master"><img src="https://codecov.io/gh/boostorg/nowide/branch/master/graph/badge.svg" alt="codecov" /></a></td> <td align="left"><a href="https://www.boost.org/doc/libs/master/libs/nowide/index.html"><img src="https://img.shields.io/badge/documentation-master-brightgreen.svg" alt="Documentation" /></a></td> </tr> <tr> <td align="left"><a href="https://github.com/boostorg/nowide/tree/develop">develop</a></td> <td align="left"><a href="https://travis-ci.com/boostorg/nowide"><img src="https://travis-ci.com/boostorg/nowide.svg?branch=develop" alt="Build Status" /></a></td> <td align="left"><a href="https://ci.appveyor.com/project/Flamefire/nowide-fr98b/branch/develop"><img src="https://ci.appveyor.com/api/projects/status/w5sywrekwd66say4/branch/develop?svg=true" alt="Build status" /></a></td> <td align="left"><img src="https://github.com/boostorg/nowide/workflows/CI%20Tests/badge.svg?branch=develop" alt="" /></td> <td align="left"><a href="https://codecov.io/gh/boostorg/nowide/branch/develop"><img src="https://codecov.io/gh/boostorg/nowide/branch/develop/graph/badge.svg" alt="codecov" /></a></td> <td align="left"><a href="https://www.boost.org/doc/libs/develop/libs/nowide/index.html"><img src="https://img.shields.io/badge/documentation-develop-brightgreen.svg" alt="Documentation" /></a></td> </tr> </tbody> </table> <p>Coverity Scan: <a href="https://scan.coverity.com/projects/boostorg-nowide"><img src="https://scan.coverity.com/projects/20464/badge.svg" alt="Coverity Scan Build Status" /></a></p> <p>Library for cross-platform, unicode aware programming.</p> <p>The library provides an implementation of standard C and C++ library functions, such that their inputs are UTF-8 aware on Windows without requiring to use the Wide API.</p> <h3>License</h3> <p>Distributed under the <a href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License, Version 1.0</a>.</p> <h3>Properties</h3> <ul> <li>C++03 <strong>(will be raised to C++11 by mid 2020)</strong></li> <li>optional C++11/17 support</li> <li>Usable outside of Boost via CMake</li> </ul> <h1>Quickstart</h1> <p>Instead of using the standard library functions use the corresponding member of Boost.Nowide with the same name. On Linux those are (mostly) aliases for the <code>std</code> ones, but on Windows they accept UTF-8 as input and use the wide API for the underlying functionality.</p> <p>Examples:</p> <ul> <li><code>std::ifstream -> boost::nowide::ifstream</code></li> <li><code>std::fopen -> boost::nowide::fopen</code></li> <li><code>std::fclose -> boost::nowide::fclose</code></li> <li><code>std::getenv -> boost::nowide::getenv</code></li> <li><code>std::putenv -> boost::nowide::putenv</code></li> <li><code>std::cout -> boost::nowide::cout</code></li> </ul> <p>To also convert your input arguments to UTF-8 on Windows use:</p> <pre class="highlightjs highlight"><code class="language- hljs">int main(int argc, char **argv) { boost::nowide::args _(argc, argv); // Must use an instance! ... } </code></pre> <p>See the <a href="https://www.boost.org/doc/libs/master/libs/nowide/index.html">Documentation</a> for details.</p> <h1>Compile</h1> <h2>With Boost</h2> <p>Compile and install the Boost super project the usual way via <code>./b2</code>. The headers and library will then be available together with all other Boost libraries. From within CMake you can then use <code>find_package(boost_nowide)</code> and link against <code>Boost::nowide</code>.</p> <h2>With CMake</h2> <p>Boost.Nowide fully supports CMake. So you can use <code>add_subdirectory("path-to-boost-nowide-repo")</code> and link your project against the target <code>Boost::nowide</code>.</p> <p>You can also pre-compile and install Boost.Nowide via the usual workflow:</p> <pre class="highlightjs highlight"><code class="language- hljs">mkdir build && cd build cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local make install </code></pre> <p>A CMake-Config file will be installed alongside Boost.Nowide so <code>find_package(boost_nowide)</code> does work out-of the box (provided it was installed into a "standard" location or its <code>INSTALL_PREFIX</code> was added to <code>CMAKE_PREFIX_PATH</code>).</p> <h1>Boost.Filesystem integration</h1> <p>Boost.Nowide integrates with Boost.Filesystem:</p> <ul> <li>Call <code>boost::nowide::nowide_filesystem()</code> to imbue UTF-8 into Boost.Filesystem (for use by <code>boost::filesystem::path</code>) such that narrow strings passed into Boost.Filesystem are treated as UTF-8 on Windows</li> </ul> <h3>More information</h3> <ul> <li><a href="http://stackoverflow.com/questions/ask?tags=c%2B%2B,boost,boost-nowide">Ask questions</a></li> <li><a href="https://github.com/boostorg/nowide/issues">Report bugs</a>: Be sure to mention Boost version, platform and compiler you're using. A small compilable code sample to reproduce the problem is always good as well.</li> <li>Submit your patches as pull requests against <strong>develop</strong> branch. Note that by submitting patches you agree to license your modifications under the <a href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License, Version 1.0</a>.</li> <li>Discussions about the library are held on the <a href="http://www.boost.org/community/groups.html#main">Boost developers mailing list</a>. Be sure to read the <a href="http://www.boost.org/community/policy.html">discussion policy</a> before posting and add the <code>[nowide]</code> tag at the beginning of the subject line.</li> </ul>
<h1>Boost.Nowide</h1> <table> <thead> <tr> <th align="left">Branch</th> <th align="left">Travis</th> <th align="left">Appveyor</th> <th align="left">Github</th> <th align="left">codecov.io</th> <th align="left">Documentation</th> </tr> </thead> <tbody> <tr> <td align="left"><a href="https://github.com/boostorg/nowide/tree/master">master</a></td> <td align="left"><a href="https://travis-ci.com/boostorg/nowide"><img src="https://travis-ci.com/boostorg/nowide.svg?branch=master" alt="Build Status" /></a></td> <td align="left"><a href="https://ci.appveyor.com/project/Flamefire/nowide-fr98b/branch/master"><img src="https://ci.appveyor.com/api/projects/status/w5sywrekwd66say4/branch/master?svg=true" alt="Build status" /></a></td> <td align="left"><img src="https://github.com/boostorg/nowide/workflows/CI%20Tests/badge.svg?branch=master" alt="" /></td> <td align="left"><a href="https://codecov.io/gh/boostorg/nowide/branch/master"><img src="https://codecov.io/gh/boostorg/nowide/branch/master/graph/badge.svg" alt="codecov" /></a></td> <td align="left"><a href="https://www.boost.org/doc/libs/master/libs/nowide/index.html"><img src="https://img.shields.io/badge/documentation-master-brightgreen.svg" alt="Documentation" /></a></td> </tr> <tr> <td align="left"><a href="https://github.com/boostorg/nowide/tree/develop">develop</a></td> <td align="left"><a href="https://travis-ci.com/boostorg/nowide"><img src="https://travis-ci.com/boostorg/nowide.svg?branch=develop" alt="Build Status" /></a></td> <td align="left"><a href="https://ci.appveyor.com/project/Flamefire/nowide-fr98b/branch/develop"><img src="https://ci.appveyor.com/api/projects/status/w5sywrekwd66say4/branch/develop?svg=true" alt="Build status" /></a></td> <td align="left"><img src="https://github.com/boostorg/nowide/workflows/CI%20Tests/badge.svg?branch=develop" alt="" /></td> <td align="left"><a href="https://codecov.io/gh/boostorg/nowide/branch/develop"><img src="https://codecov.io/gh/boostorg/nowide/branch/develop/graph/badge.svg" alt="codecov" /></a></td> <td align="left"><a href="https://www.boost.org/doc/libs/develop/libs/nowide/index.html"><img src="https://img.shields.io/badge/documentation-develop-brightgreen.svg" alt="Documentation" /></a></td> </tr> </tbody> </table> <p>Coverity Scan: <a href="https://scan.coverity.com/projects/boostorg-nowide"><img src="https://scan.coverity.com/projects/20464/badge.svg" alt="Coverity Scan Build Status" /></a></p> <p>Library for cross-platform, unicode aware programming.</p> <p>The library provides an implementation of standard C and C++ library functions, such that their inputs are UTF-8 aware on Windows without requiring to use the Wide API.</p> <h3>License</h3> <p>Distributed under the <a href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License, Version 1.0</a>.</p> <h3>Properties</h3> <ul> <li>C++03 <strong>(will be raised to C++11 by mid 2020)</strong></li> <li>optional C++11/17 support</li> <li>Usable outside of Boost via CMake</li> </ul> <h1>Quickstart</h1> <p>Instead of using the standard library functions use the corresponding member of Boost.Nowide with the same name. On Linux those are (mostly) aliases for the <code>std</code> ones, but on Windows they accept UTF-8 as input and use the wide API for the underlying functionality.</p> <p>Examples:</p> <ul> <li><code>std::ifstream -> boost::nowide::ifstream</code></li> <li><code>std::fopen -> boost::nowide::fopen</code></li> <li><code>std::fclose -> boost::nowide::fclose</code></li> <li><code>std::getenv -> boost::nowide::getenv</code></li> <li><code>std::putenv -> boost::nowide::putenv</code></li> <li><code>std::cout -> boost::nowide::cout</code></li> </ul> <p>To also convert your input arguments to UTF-8 on Windows use:</p> <pre class="highlightjs highlight"><code class="language- hljs">int main(int argc, char **argv) { boost::nowide::args _(argc, argv); // Must use an instance! ... } </code></pre> <p>See the <a href="https://www.boost.org/doc/libs/master/libs/nowide/index.html">Documentation</a> for details.</p> <h1>Compile</h1> <h2>With Boost</h2> <p>Compile and install the Boost super project the usual way via <code>./b2</code>. The headers and library will then be available together with all other Boost libraries. From within CMake you can then use <code>find_package(boost_nowide)</code> and link against <code>Boost::nowide</code>.</p> <h2>With CMake</h2> <p>Boost.Nowide fully supports CMake. So you can use <code>add_subdirectory("path-to-boost-nowide-repo")</code> and link your project against the target <code>Boost::nowide</code>.</p> <p>You can also pre-compile and install Boost.Nowide via the usual workflow:</p> <pre class="highlightjs highlight"><code class="language- hljs">mkdir build && cd build cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local make install </code></pre> <p>A CMake-Config file will be installed alongside Boost.Nowide so <code>find_package(boost_nowide)</code> does work out-of the box (provided it was installed into a "standard" location or its <code>INSTALL_PREFIX</code> was added to <code>CMAKE_PREFIX_PATH</code>).</p> <h1>Boost.Filesystem integration</h1> <p>Boost.Nowide integrates with Boost.Filesystem:</p> <ul> <li>Call <code>boost::nowide::nowide_filesystem()</code> to imbue UTF-8 into Boost.Filesystem (for use by <code>boost::filesystem::path</code>) such that narrow strings passed into Boost.Filesystem are treated as UTF-8 on Windows</li> </ul> <h3>More information</h3> <ul> <li><a href="http://stackoverflow.com/questions/ask?tags=c%2B%2B,boost,boost-nowide">Ask questions</a></li> <li><a href="https://github.com/boostorg/nowide/issues">Report bugs</a>: Be sure to mention Boost version, platform and compiler you're using. A small compilable code sample to reproduce the problem is always good as well.</li> <li>Submit your patches as pull requests against <strong>develop</strong> branch. Note that by submitting patches you agree to license your modifications under the <a href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License, Version 1.0</a>.</li> <li>Discussions about the library are held on the <a href="http://www.boost.org/community/groups.html#main">Boost developers mailing list</a>. Be sure to read the <a href="http://www.boost.org/community/policy.html">discussion policy</a> before posting and add the <code>[nowide]</code> tag at the beginning of the subject line.</li> </ul>