6.0.0-beta6
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
4/10/26
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#1329] google search (utf-8)
*
Your Email Address
*
Spam protection
Enter the letters below:
. ..__ .__ .__.. |_/ [__)[__)| || | \[__)| |__||___
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; > > } > >
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers