6.0.0-beta1
7/6/25

[#1329] google search (utf-8)
Summary google search (utf-8)
Queue Horde Base
Queue Version 3.0.3-RC1
Type Bug
State Resolved
Priority 1. Low
Owners
Requester nils.juenemann (at) fh-telekom-leipzig (dot) de
Created 02/08/2005 (7453 days ago)
Due
Updated 05/13/2005 (7359 days ago)
Assigned 02/08/2005 (7453 days ago)
Resolved 05/13/2005 (7359 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
05/13/2005 09:21:04 PM Jan Schneider Comment #4
State ⇒ Resolved
Reply to this comment
Fixed.
03/06/2005 12:30:00 PM Jan Schneider Comment #3
State ⇒ Not A Bug
Reply to this comment
No feedback.
02/08/2005 09:14:13 AM Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
As I already told you (IIRC), this won't work because the entered 
search string could be in any charset, depending on the current 
language and the server's capabilities. The charset conversion needs 
to be done on the server side instead.
02/08/2005 09:04:13 AM nils (dot) juenemann (at) fh-telekom-leipzig (dot) de Comment #1
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ google search (utf-8)
Queue ⇒ Horde Base
Reply to this comment
The google form on horde portal does'nt support encoding to utf-8.



Here is the patch therefor:



--- open_google_win.js.orig     Sat Dec 25 00:12:52 2004

+++ open_google_win.js  Sat Dec 25 00:11:29 2004

@@ -36,9 +36,27 @@



      var name = "Google";

      var param = 
"toolbar=yes,location=yes,status=yes,scrollbars=yes,resizable=yes,width=800,height=600,left=0,top=0";

-    url = url + escape(document.google.q.value);

+    url = url + escape(encode_utf8(document.google.q.value));

      eval("name = window.open(url, name, param)");

      if (!eval("name.opener")) {

          eval("name.opener = self");

      }

+}

+

+function encode_utf8(q) {

+    q = q.replace(/\r\n/g,"\n");

+    var qutf = "";

+    for(var i=0; i<q.length; i++) {

+       var c=q.charCodeAt(i);

+       if (c<128)

+           qutf += String.fromCharCode(c);

+       else if((c>127) && (c<2048)) {

+           qutf += String.fromCharCode((c>>6)|192);

+           qutf += String.fromCharCode((c&63)|128);}

+        else {

+            qutf += String.fromCharCode((c>>12)|224);

+            qutf += String.fromCharCode(((c>>6)&63)|128);

+            qutf += String.fromCharCode((c&63)|128);}

+        }

+    return qutf;

  }


Saved Queries