Wednesday 21 February 2007 9:02:47 am - 8 replies
I am trying to use an URL with a view parameter that contains special characters:
View parameter should processed in the template as "München", not "M%FCnchen"
How can I retrieve that special character in the template? I have looked for a template operator that searches and replaces characters in a string but there doesn't seem to be one.
Wednesday 21 February 2007 9:30:56 pm
Was just looking through the Forum and thought this interesting as I've experienced the same. However, in this case I cannot recreate the problem.
If I create a URL with the word "München" in it I use the special character %C3%BC rather than %FC and it appears to work ok.
Wednesday 21 February 2007 9:38:40 pm
thanks for your reply. Click on the link that is in my first post. You will get to my development site. The header you see that beginns with "Firmensitz in ..." uses the view parameter. So you see directly what the variable contains.
I just tried the URL with "München". With Win32/Firefox I get
With Win32/Internet Explorer 7, the URL shown stays:
but the variable contains:
Hmm. Partly a browser issue. Nevertheless, I still need a variable in my template that contains "München" with the special character.
Wednesday 21 February 2007 10:34:04 pm
Just tried this by creating a new folder on one of my sites and naming it München (copy and paste rather than using special characters).
It appeared ok on all browsers in the main body but the url read muenchen.
I tried 4 different special character codes and within the body "ü" worked the best... but not in the heading or URL.
Cross browser, cross platform issues, makes me cross
Wednesday 21 February 2007 10:34:20 pm
I am not sure why you get this as it works fine when I test a similar setup here (same view parameter, iso-8859-1 as charset). Maybe this also depends on the encoding of the templates? Anyhow, have you tried to simply url-decode the view parameter?
Wednesday 21 February 2007 10:58:26 pm
Urldecode is an easy one as it takes only one parameter:
Regarding the url - as far as I know the browsers should encode the url, with IE being (of course...) the exception to the rule. So I think you can forget about getting a nice, unencoded url consistently on all browsers. Actually the Firefox html validator complains about a malformed urisequence when you have an unencoded umlaut in the href attribute, although the online validator says it's ok. So confusion all around...
Thursday 22 February 2007 1:03:49 am
I wasn't looking at the template so much. More the way it displays in a browser.
I was wondering how 3.9 would handle the different encodings as I had problems with the "&" symbol.
I went into the admin interface and created a new folder and tried naming it:
München (which was just a copy and paste of "München" from this forum)
"M%FCnchen" (ISO 8859-1 Latin-1 hex code)
"München" (ISO 8859-1 Latin-1 name code)
"München" (ISO 8859-1 Latin-1 number code)
The copy and pasted "München" appeared ok on all browsers in the main body but in the url bar it read as muenchen.
Not sure if this helps at all.
Thursday 22 February 2007 4:03:45 pm
thanks for your clarification. A folder or article with an umlaut is automatically changed to a regular url (München => muenchen). No problem here. I was talking about view parameters. Those are are not changed when they are processed through the template system.
Thanks for all of your help. The urlencode / decode as a template operators work like a charm!
Modified on Thursday 22 February 2007 4:04:18 pm by Karsten Jennissen
You must be logged in to post messages in this topic!