Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-08-06 22:16:40

saccade
Plugin Author
From: Neubeuern, Germany
Registered: 2004-11-05
Posts: 521

Search input with Umlauts

Hi, I hope this isn’t a stupid question:

For the first time in my Textpattern-life on different servers I have trouble with the search input when used with german umlauts – e.g. searching for a name like “Döbrich”.
It won’t find anything, and it transforms the term “Döbrich” to “D%C3%B6brich”.
Also in the URL: http://hochschulgemeinde.de/index.php?q=D%25C3%25B6brich

There is no problem when I correct the URLadress in the part after ?= directly, then it will search correctly.
(There are definitely results, when using this http://hochschulgemeinde.de/index.php?q=Döbrich )

You can try this on: http://hochschulgemeinde.de

My head correctly defines
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

So I think it maybe there’s something to do on the server configuration?
But what?
Can I do something in the htaccess?

Help very welcome. Thanks in advance!

Offline

#2 2011-08-07 07:22:52

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Search input with Umlauts

The URL should be:
http://hochschulgemeinde.de/index.php?q=D%C3%B6brich
Looks like something is doing an url_encode() twice.

Which TXP version is this, because I can’t reproduce this elsewhere?

Offline

#3 2011-08-07 08:27:42

saccade
Plugin Author
From: Neubeuern, Germany
Registered: 2004-11-05
Posts: 521

Re: Search input with Umlauts

Hi ruud,

thanks. I think I should have looked closer – I didn’t notice the difference between both url_encodes.

Sorry if my TXP version causes trouble: it’s has been 4.4.0 r3521
now I just updated to 4.4.1 r3577 – but it’s just the same here.

Edit And upgrading to the newest r3584 didn’t help. Just the same behaviour.

Last edited by saccade (2011-08-07 08:50:34)

Offline

#4 2011-08-07 09:37:46

saccade
Plugin Author
From: Neubeuern, Germany
Registered: 2004-11-05
Posts: 521

Re: Search input with Umlauts

A detailed diagnosis shows these character-set-settings:

Charset (default/config): latin1/latin1
character_set_client: latin1
character_set_connection: latin1
character_set_database: latin1
character_set_filesystem: binary
character_set_results: latin1
character_set_server: latin1
character_set_system: utf8
character_sets_dir: /usr/share/mysql/charsets/
20 Tables: OK

That’s quite different from what I have at other places (utf8 everywhere except filesystem).

Offline

#5 2011-08-07 09:43:45

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,258
Website GitHub Mastodon Twitter

Re: Search input with Umlauts

Hi Michael
I would convert to utf8. latin1 to utf8 might be of help. Back up the db before you use it:)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#6 2011-08-07 10:17:01

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Search input with Umlauts

Do you have a .htaccess file or plugin that causes this redirect:

Clicking ‘search’ initially tries to get an URL like this:
http://www.hochschulgemeinde.de/?q=%C3%A9nter

But that triggers a HTTP 301 redirect to:
Location: http://hochschulgemeinde.de/index.php?q=%25C3%25A9nter

And that’s where the second url_encode happens.

If you have something like [R=301,L] in your .htaccess, replace it with [R=301,NE,L]

Last edited by ruud (2011-08-07 10:34:03)

Offline

#7 2011-08-07 13:05:43

saccade
Plugin Author
From: Neubeuern, Germany
Registered: 2004-11-05
Posts: 521

Re: Search input with Umlauts

I had something like that in my .htaccess,
replaced it – but with no effect.

Now I completely discarded the old .htaccess and use the .htaccess directly from the release – but again with no effect.
second url_encode obviously still happens.

No different behaviour.

Offline

#8 2011-08-07 13:17:13

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Search input with Umlauts

It does work now, so unless you changed something else, it was the .htaccess file that caused the problem.

Offline

#9 2011-08-07 13:39:54

saccade
Plugin Author
From: Neubeuern, Germany
Registered: 2004-11-05
Posts: 521

Re: Search input with Umlauts

Hi ruud,
thank you very much for your help! :)

(I didn’t change something else, must have been the cache or something like that to keep me away from the solution. So the old .htaccess file caused the problem. It’s better with a default .htaccess anyway.)

Have a nice sunday!

Offline

Board footer

Powered by FluxBB