View Full Version : Solved foreign characters when switching between languages

06-04-11, 21:36

This thread was posted by a user with German set as his default language:


All good. When I switch the forum to English using the flag and then hover over that link in 'What's New?' I see:


Great - until I click on the link. When the page opens I see the following in the browser address bar:


I need German words containing special characters (ö,ä etc) to stay as they are because people searching for my content will use German words in the search string regardless of the language they themselves speak.

What can I do to prevent this foreign character problem chaps? Or am I missing something really obvious? Wouldn't be the first time since I started using Vbet :)

Just for info: in Vbseo I have the following set:

'Replace Non-English Characters in URLs? - no'

'Define your custom character replacements
'ü' => 'ue'
'ä' => 'ae'
'ö' => 'oe'
'ß' => 'ss'
'Ü' => 'Ue'
'Ä' => 'Ae'
'Ö' => 'Oe''


06-04-11, 21:45
please check this solution:
you should declare this redirection ONLY for GERMAN letters!
polish letters (and of course another languages too) it works good so make this replacement only for german letters.

06-04-11, 21:52
Hi Kamil,

I haven't changed anything since we last worked on this. I amended my post above to show how vbseo is currently set for foreign characters. The only thing I've done recently is to update Vbulletin with the security patch.

06-04-11, 22:32
Just testing this. The problem appears to be caused by place names, names - basically terms which Google would not translate.

The following link is as it appears to a German user:


click on the English flag and the same link looks like this:


Vbseo character replacement doesn't appear to handle any language other than the forum default when vbet is installed.

07-04-11, 10:38

Ok i can reproduce it, so I will solve it on my test forum.

As I see the problem is only with words which are untranslatable (names etc. like Düren and Björn)

Confirmed and will be solved!

07-04-11, 13:33
Thanks Kamil :)

08-04-11, 17:09
Any progress on this one Kamil?

08-04-11, 19:04
still working on it. thanks for your patience.
We will write here all solution:)

08-04-11, 19:24
Cool. Thanks Kamil.

04-05-11, 13:20
Hello. I just started working on it and after some analyze I realized that there is no bug at all... I will still check possibility of changing the behavior, now here is explanation what happens:
- your translated pages are in UTF-8 so browsers shows special characters from URL in nice way (excluding IE which do not honor this standard)
- your original pages are not un UTF-8 so browser do not display special characters in nice way and vBET do not changes URLs for not translated pages

I will check how it will behave if vBET re-encode URL even for not translated page - I cannot predict it because page encoding and URL encoding will differ. If it will help I will give you quick fix and probably will not include it in official release (or configurable - need to check first results and think about possible effects). If it will not help it will stay as it is because it is browser display issue (just like IE do not shows special characters in nice way at all - maybe newest does it didn't check it).

I will give you feedback in few moments.

04-05-11, 14:24
OK so - I know exactly what is going on now. Described behavior is intended. In case of original pages vBET encodes URLs to safe UTF-8 - otherwise you would see broken characters on your forum page. It is because when you show string in other encoding that is the page then it will be decoded in wrong way - so you see broken characters. That is why in vbenterprisetranslator_functions_bbcode.php we have this code:

if (!$_REQUEST['language'] && vB_Template_Runtime::fetchStyleVar('charset') != 'utf-8') {
$translated = vbet_encodeToSafeUTF8($translated);

If you comment it then you will see nice URL in browser on not translated page with special characters, but those special characters will be broken on forum page. The issue is that vBSEO do not allows to recognize which URL generation is for page and which for browser URL. So we are not able to encode to safe UTF-8 only for URLs to view and leave as it is for broswer. It is vBSEO API limitation and it have to stay this way. This is not a bug - this is indented feature which allows to have nice view with special characters on not translated limited by vBSEO API which makes requests for URL rendering.

At this moment issue closed. If you have some comments, ideas, questions - just feel free to write :) We can reopen it if some crucial information will appear. I also move it to troubleshooting section as it is not recognized as bug.

AfrikaansAlbanianArabicBelarusianBulgarianCatalanChineseCroatianCzechDanishDutchEnglishEstonianFilipinoFinnishFrenchGalicianGermanGreekHaitian CreoleHebrewHindiHungarianIcelandicIndonesianIrishItalianJapaneseKoreanLatvianLithuanianMacedonianMalayMalteseNorwegianPersianPolishPortugueseRomanianRussianSerbianSlovakSlovenianSpanishSwahiliSwedishTaiwaneseThaiTurkishUkrainianVietnameseWelshYiddish
Translations supported by vBET Translator 4.9.99