Skip to content

Unicode support

jarro2783 edited this page Nov 8, 2014 · 3 revisions

Unicode is supported as far as anything used as an argument will be passed around as-is. However, for help strings, extra support is required, since printing a string requires knowing how long it is. If you would like to enable Unicode support for help strings, a few extra steps are needed, as the ICU library is used to handle strings.

To enable the use of the ICU library, it is necessary to define the macro CXXOPTS_USE_UNICODE before including cxxopts.hpp. Then, internally, the help strings are processed using the ICU library. If you do that, it is therefore necessary to make sure that the compiler can find <unicode/unistr.h>, and that icu-uc is linked in to your binary.

Clone this wiki locally