Page 1 of 1

German Umlauts not showing correctly

Posted: Tue Mar 31, 2015 10:56 am
by Dr.Sterni
Hi guys,

I'm sorry to ask but there seems to be no answer to my question already (I was looking for it on this forum and in the HESK-knowledgebase).

After installing HESK yesterday everything seemed to run very well, except the language. So I downloaded the zip-file with the german translation (thanks for that!!!), but afterwards I got huge problems with the german umlauts.

These parameters are set in the text.php-file:

Code: Select all

$hesklang['LANGUAGE']='Deutsch';

// Language encoding. It MUST be set to UTF-8 for all languages!
$hesklang['ENCODING']='UTF-8';

// MySQL utf8 collation. Do not change if not sure what to use.
$hesklang['_COLLATE']='utf8_unicode_ci';
In the tables inside the database also "utf8_unicode_ci" is set.

As soon as I switch to "Deutsch" in the settings menu (the test-language-function gives back "ok" both on the texts and the email-parts) I get strange outputs from HESK itself (e.g.: "Statusüberprüfung" instead of "Statusüberprüfung") AND the tickets are not saved well. An example for a ticket:

Ref.: "täst"
Message: "däies iöst eüin tßest"

(which is of course literally nonsense) is shown like this:

Ref.: t?st
Message: "d?ies i?st e?in t?est"

When I look this up in the database it's already wrong there. So what the editor saves to the database, is already this: "d?ies i?st e?in t?est".

Also I will have to add some users with umlauts in their names. That also does not work: For example a guy named "Rücker" would be saved as "R?cker" to the database.

Can you help? I don't know what to change in order to make this thing run in German language.

Thanks a lot!

Dr.Sterni.

Re: German Umlauts not showing correctly

Posted: Tue Mar 31, 2015 11:14 am
by Klemen
It seems to run fine in the demo:
http://www.hesk.com/demo/ticket.php?track=WPJ-Y82-M6XL

This means something is probably wrong with encoding (HESK expects UTF-8, but some other encoding is entered)?

If you made any changes to the German "text.php" file, make 101% sure it is saved as UTF-8 format without BOM (you can use a powerful free editor such as Notepad++ to make sure it is saved in correct encoding).

If you didn't make any changes please post a link to your help desk so we can check what's going on.

Re: German Umlauts not showing correctly

Posted: Tue Mar 31, 2015 11:39 am
by Dr.Sterni
Thanks for your FAST reply!!! Great, really!

Yes, I am 111% (!) sure, that I did not make any changes but anyway opened up the text.php-file with notepad++, changing the coding to "UTF-8 without BOM" and saving it again ('cause you never know and it has been described in the knowledgebase like that).

the URL to this installation is:

helpdesk.fotomarathon-duesseldorf.de

User: klemen, PW: <via PM>

Thank you so much!

Re: German Umlauts not showing correctly

Posted: Tue Mar 31, 2015 12:09 pm
by Klemen
Found the issue - your server is sending a content-type header that is setting encoding to iso-8859-1. Browsers obey this header and ignore the "utf-8" set by HESK. So basically you are sending text to HESK in iso-8859-1 instead of utf-8.

To fix the issue try this:

1. Open file "inc/common.inc.php" in Notepad++

2. Find this line:

Code: Select all

if (!defined('IN_SCRIPT')) {die('Invalid attempt');}
3. Just below that line add:

Code: Select all

header('Content-Type: text/html; charset=utf-8');
4. Save, upload, close all browser windows and test.

Note that the change will only reflect on new tickets (replies), not existing ones.

Re: German Umlauts not showing correctly

Posted: Tue Mar 31, 2015 1:04 pm
by Dr.Sterni
Man, this is AWESOME!!!!

Thank you so much.

Do you think that this has to do with the chosen provider? We are using the company "Strato" for our webhosting, which did not lead to strange problems for the first time, to be honest.

Re: German Umlauts not showing correctly

Posted: Tue Mar 31, 2015 1:27 pm
by Klemen
It's actually just due to a PHP configuration directive and changes in PHP 5.6+

I will include this modification in the next release cycle to make sure it doesn't happen with other hosts with the same configuration.