Boost C++ Libraries: Ticket #405: call to split_winmain raises exception for 8-bit locale https://svn.boost.org/trac10/ticket/405 <pre class="wiki">This bug is detected for boost::program_options::split_winmain function and debug version CRT of the VC 7.0 under WinXP. The problem is: split_winmain (winmain.cpp, line 62) uses isspace() from VC CRT. The isspace() got int value which &lt; 0 and not EOF and raises exception. That int value is russian symbol in rus_russia.1251 locale and casted to int. Before to call to winmain i had setted locales for CRT and STL: if (NULL == setlocale(LC_ALL, "rus_russia.1251")) { ... } std::locale::global(std::locale("rus_russia.1251")); ... I suppose, there is simple fix: change isspace(*i) call to isspace((unsigned char)*i) </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/405 Trac 1.4.3 Vladimir Prus Thu, 24 Nov 2005 09:26:00 GMT status changed https://svn.boost.org/trac10/ticket/405#comment:1 https://svn.boost.org/trac10/ticket/405#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> </ul> <pre class="wiki">Logged In: YES user_id=321498 Fixed. </pre> Ticket