mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
Merge pull request #122 from polserver/unicode-lower-upper-fixes
Add UTF8 checks to String toLower/toUpper
This commit is contained in:
commit
7bb27f7198
3 changed files with 18 additions and 1 deletions
|
|
@ -2,9 +2,14 @@
|
|||
<ESCRIPT>
|
||||
<header>
|
||||
<topic>Latest Core Changes</topic>
|
||||
<datemodified>01-18-2020</datemodified>
|
||||
<datemodified>01-20-2020</datemodified>
|
||||
</header>
|
||||
<version name="POL100">
|
||||
<entry>
|
||||
<date>01-20-2020</date>
|
||||
<author>Kevin:</author>
|
||||
<change type="Fixed">Huge Performance loss in Lower/Upper String functions.</change>
|
||||
</entry>
|
||||
<entry>
|
||||
<date>01-18-2020</date>
|
||||
<author>DevGIB:</author>
|
||||
|
|
|
|||
|
|
@ -404,6 +404,11 @@ std::vector<wchar_t> convertutf8( const std::string& value )
|
|||
|
||||
void String::toUpper()
|
||||
{
|
||||
if ( !hasUTF8Characters() )
|
||||
{
|
||||
Clib::mkupperASCII( value_ );
|
||||
return;
|
||||
}
|
||||
#ifndef WINDOWS
|
||||
std::vector<wchar_t> codes = convertutf8<wchar_t>( value_ );
|
||||
value_.clear();
|
||||
|
|
@ -438,6 +443,11 @@ void String::toUpper()
|
|||
|
||||
void String::toLower()
|
||||
{
|
||||
if ( !hasUTF8Characters() )
|
||||
{
|
||||
Clib::mklowerASCII( value_ );
|
||||
return;
|
||||
}
|
||||
#ifndef WINDOWS
|
||||
std::vector<wchar_t> codes = convertutf8<wchar_t>( value_ );
|
||||
value_.clear();
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
-- POL100 --
|
||||
01-20-2020 Kevin:
|
||||
Fixed: Huge Performance loss in Lower/Upper String functions.
|
||||
01-18-2020 DevGIB:
|
||||
Changed: Return type of XMLFile method .appendxmlnode() now returns the created node on success.
|
||||
Changed: Return type of XMLNode method .appendxmlnode() now returns the created node on success.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue