Summary: | New slashdot is broken with Turkish locale | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Ismail Donmez <ismail> |
Component: | khtml ecma | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Ismail Donmez
2006-06-08 18:11:17 UTC
Logs with KJS_VERBOSE : http://cekirdek.pardus.org.tr/~ismail/tmp/kjs_tr.txt (LC_ALL=tr_TR) http://cekirdek.pardus.org.tr/~ismail/tmp/kjs_C.txt (LC_ALL=C) SVN commit 549506 by dfaure: Fix /. for Turkish users: use locale-independent toupper and tolower replacements. BUG:128842 M +6 -4 ustring.cpp --- branches/KDE/3.5/kdelibs/kjs/ustring.cpp #549505:549506 @@ -131,18 +131,20 @@ UChar UChar::toLower() const { // ### properly support unicode tolower - if (uc >= 256 || islower(uc)) + if (uc >= 256) return *this; - return (unsigned char)tolower(uc); + // tolower is locale-dependent, don't use it. + return static_cast<unsigned char>( ( ( uc >= 'A' ) && ( uc <= 'Z' ) ) ? ( (int)uc + 'a' - 'A' ) : uc ); } UChar UChar::toUpper() const { - if (uc >= 256 || isupper(uc)) + if (uc >= 256) return *this; - return (unsigned char)toupper(uc); + // toupper is locale-dependent, don't use it. + return static_cast<unsigned char>( ( ( uc >= 'a' ) && ( uc <= 'z' ) ) ? ( (int)uc + 'A' - 'a' ) : uc ); } UCharReference& UCharReference::operator=(UChar c) |