Bug 150381

Summary: google is unable to use non-ascii characters with konqueror.
Product: [Applications] konqueror Reporter: Raúl <rasasi78>
Component: kjsAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Patch

Description Raúl 2007-10-01 18:39:59 UTC
Version:           3.5.7 (using KDE 3.5.7, Debian Package 4:3.5.7.dfsg.1-7 (lenny/sid))
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.22-2-686

When I do a google maps search on konqueror and I use any non-ascii character google misunderstand it on actions, or maybe it's konqueror which does. Look this example:

-Go to maps.google.es
-Go to "buscar negocios"
-Type "hoteles" on the left box and "Málaga" on the right one.
-Go down the list and press "Siguiente"

You will see that on the top right box, "Málaga" turns into "M<some weird char>laga".

As per DevEagle on #khtml this seems to happens because konqueror inserts an unicode replacement char from whatever JS google uses to mangle the URL.

Also he noticed that this problem doesn't happen on konqueror4.

Regards,
Comment 1 Maksim Orlovich 2007-10-01 18:57:55 UTC
Testcase:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script>
alert(decodeURIComponent("%C3%A1"));
</script>

(Should be á)
Comment 2 Maksim Orlovich 2007-10-01 18:58:57 UTC
Created attachment 21730 [details]
Patch

This conditional is clearly wrong, since the >= 0x80 chars should be two-byte
encoded. I am not sure we need the overall paranoia about overlongs -- Harri?
Comment 3 Maksim Orlovich 2007-10-02 06:21:24 UTC
SVN commit 719916 by orlovich:

Fix a bad regression caused by a bug in the stricter utf-8 validation code 
that caused us to replace latin1 glyphs (e.g. accented chars) 
with the unicode replacement character.

BUG:150381


 M  +2 -2      function.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=719916