Re: [Boost-bugs] [Boost C++ Libraries] #9435: Erroneous character set conversions of strings with more than int32 bytes

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9435: Erroneous character set conversions of strings with more than int32 bytes
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-11-26 14:31:07


#9435: Erroneous character set conversions of strings with more than int32 bytes
-------------------------------------+-------------------------------------
  Reporter: Martin Korp | Owner: artyom
  <martin.korp@…> | Status: closed
      Type: Bugs | Component: locale
 Milestone: To Be Determined | Severity: Problem
   Version: Boost 1.54.0 | Keywords: character set
Resolution: wontfix | conversion
-------------------------------------+-------------------------------------
Changes (by artyom):

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

Comment:

 - This is the limitation of ICU.
 - It is bad idea to convert "huge chuncks of text" via to_utf API as it
 allocates entire text in memory.

 However, you can use std::locale::codecvt facet for stream based
 conversions that provide integration with io-streams:

 http://www.boost.org/doc/libs/1_55_0/libs/locale/doc/html/charset_handling.html#codecvt_codecvt

 Of course it is not as simple as call to_utf or from_utf, however,
 allocating buffer of more than 2G for string is not good idea either.

 Closing this bug.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9435#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:50:14 UTC