|
Boost : |
From: SourceForge.net (noreply_at_[hidden])
Date: 2005-05-22 15:05:47
Bugs item #1206663, was opened at 2005-05-22 13:05
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1206663&group_id=7586
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: call to split_winmain raises exception for 8-bit locale
Initial Comment:
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 < 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)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1206663&group_id=7586
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
Boost-bugs mailing list
Boost-bugs_at_[hidden]
https://lists.sourceforge.net/lists/listinfo/boost-bugs
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk