Opened 15 years ago

Closed 15 years ago

#1269 closed Bugs (wontfix)

boost::to_upper does not handle strings with s-sharps.

Reported by: anonymous Owned by: Pavol Droba
Milestone: To Be Determined Component: string_algo
Version: Boost 1.34.1 Severity: Problem
Keywords: Cc:

Description

S sharp ß in upper case is written "SS". Uppercased "weiße" should be "WEISSE", not "WEIßE".

boost::to_upper works on strings, and not on single characters like std::toupper(), so it can handle such transformation of s sharp.

Change History (1)

comment:1 by Pavol Droba, 15 years ago

Resolution: wontfix
Status: newclosed

I'm not sure if this can be handled this in the scope of the string_algo library. The library doesn't have the actual conversion tables, all the algorithms solely depend on the C++ locales. Locale's ctype<> facet performs the actual conversion in do_toupper method. There is a string variant, but according to standard, it works on per-character basis:

charT do_toupper(charT c) const; const charT* do_toupper(charT* low, const charT* high) const;

Effects:

Converts a character or characters to upper case. The second form replaces each character *p in the range [low, high) for which a corresponding upper-case character exists, with that character.

Returns:

The first form returns the corresponding upper-case character if it is known to exist, or its argument if not. The second form returns high.

As you can see, the locale function performs the substitution in place on per-character basis. boost::to_upper is consistent with this behavior.

Given that, I consider this issue not to be a bug rather a feature.

Note: See TracTickets for help on using tickets.