Bug 145562 - decodeURIComponent character encoding is broken
Summary: decodeURIComponent character encoding is broken
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: kjs (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-17 17:29 UTC by Thomas Jarosch
Modified: 2007-10-10 18:32 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 Thomas Jarosch 2007-05-17 17:29:59 UTC
Version:            (using KDE KDE 3.5.6)
Installed from:    SuSE RPMs

Hello,

while testing Horde's Turba (addressbook) using the German translation I found a bug in kjs's decodeURIComponent function. Consider the following example:

<html>
<body>

<script type="text/javascript">
document.write(decodeURIComponent('Telefon%20gesch%C3%A4ftlich'))
</script>

</body>
</html>

That should display "Telefon geschäftlich" with an umlaut. It works in Firefox,
but konqueror replaces the umlaut with a broken character.

Best regards,
Thomas Jarosch
Comment 1 Peter Palm 2007-10-10 16:51:23 UTC
I can confirm this, ran into the same problem.

The problem is, I can't (won't) fix the code that uses the function, it's in the well known prototype.js library.

Another example:

    <script type="text/javascript">
      <!--
      document.write(decodeURIComponent('Bart%C3%B3k') + "<br>");
      var str = decodeURIComponent('Bart%C3%B3k');
      for (i=0;i<str.length;i++)
        document.write(str.charCodeAt(i) + " ");
        
      // -->
    </script>


Or look at: http://watdoejefout.nl/konqueror/decodeURIComponent.html
Comment 2 Peter Palm 2007-10-10 17:09:01 UTC
By the way, I'm using Konqueror from KDE 3.5.7, Debian Sid
Comment 3 Maksim Orlovich 2007-10-10 18:32:07 UTC
Thanks for the report --- I've fixed this for 3.5.8 independently of this in:
http://lists.kde.org/?l=kde-commits&m=119129888925302&w=2