Opened 15 years ago

Closed 12 years ago

#1755 closed Bugs (fixed)

Boost.tokenizer is broken for wide characters - patch attached

Reported by: amit@… Owned by: jsiek
Milestone: Boost 1.36.0 Component: tokenizer
Version: Boost 1.35.0 Severity: Problem
Keywords: wchar_t, isspace, ispunct Cc:

Description

bug in token_functions.hpp - char_separator::is_kept and is_dropped call std::isspace and std::isdropped. But these cause an assert failure in debug build when parsing a wstring (at least on MSVC 7.1) since the CRT function isspace etc expect input to lie in the range 0-0xFF. MSDN documentation says that the behaviour is undefined outside this range; iswspace() etc are provided for use with wide characters. Please see the attached path for a fix to the problem. Note that this problem persists since at least 1.33, maybe even before then.

Attachments (1)

token_functions.diff (2.3 KB ) - added by amit@… 15 years ago.
Patch containing a fix for 1755

Download all attachments as: .zip

Change History (2)

by amit@…, 15 years ago

Attachment: token_functions.diff added

Patch containing a fix for 1755

comment:1 by Noel Belcourt, 12 years ago

Resolution: fixed
Status: newclosed

(In [62706]) Fix ticket 1755 by applying the attached patch.

Note: See TracTickets for help on using tickets.