Bug 128842 - New slashdot is broken with Turkish locale
Summary: New slashdot is broken with Turkish locale
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml ecma (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-08 18:11 UTC by Ismail Donmez
Modified: 2006-06-08 23:12 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ismail Donmez 2006-06-08 18:11:17 UTC
Version:            (using KDE KDE 3.5.3)
Installed from:    Unlisted Binary Package
OS:                Linux

Open a konsole,

LC_ALL=tr_TR konqueror

and notice that sidebar on the left does not collapse.

Now try,

LC_ALL=C konqueror

and sidebar collapses correctly, and you see the menu artifact now too.
Comment 1 Ismail Donmez 2006-06-08 20:32:01 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)
Comment 2 David Faure 2006-06-08 23:12:04 UTC
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)