Skip to content
Permalink
Browse files

Merge pull request #122 from polserver/unicode-lower-upper-fixes

Add UTF8 checks to String toLower/toUpper
  • Loading branch information
turleypol committed Jan 20, 2020
2 parents 790d847 + 1b25a7c commit 7bb27f71982985a76654dd4bf7f287c2f8b062f7
Showing with 18 additions and 1 deletion.
  1. +6 −1 docs/docs.polserver.com/pol100/corechanges.xml
  2. +10 −0 pol-core/bscript/str.cpp
  3. +2 −0 pol-core/doc/core-changes.txt
@@ -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.

0 comments on commit 7bb27f7

Please sign in to comment.
You can’t perform that action at this time.