Re: [Boost-bugs] [Boost C++ Libraries] #1269: boost::to_upper does not handle strings with s-sharps.

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #1269: boost::to_upper does not handle strings with s-sharps.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2007-09-18 15:04:15


#1269: boost::to_upper does not handle strings with s-sharps.
-------------------------------+--------------------------------------------
  Reporter: anonymous | Owner: pavol_droba
      Type: Bugs | Status: closed
 Milestone: To Be Determined | Component: string_algo
   Version: Boost 1.34.1 | Severity: Problem
Resolution: wontfix | Keywords:
-------------------------------+--------------------------------------------
Changes (by pavol_droba):

  * status: new => closed
  * resolution: => wontfix

Comment:

 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.

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1269#comment:1>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.


This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:56 UTC