
Hello, Just upgraded from 2.4.7 and now all self-made templates do not show correctly. I have everything set to UTF-8 and yet i still have strange characters instead of the correct character. I have tried setting the UTF-8 options manually in each template/form but this does not effect it. the "page source" shows in the header " <meta http-equiv="Content-type" content="text/html;charset=utf-8" /> " so it should be set. if i manually paste some french/german text into the text field it is shown correctly, only if i use a template does it not show correctly. httpd.conf is default UTF-8. running out of ideas. thanks for any guidance. Neil

Hi Neil, The templates are stored in the database - is the db charset also utf-8? MySQL can be a bitch when you want to convert charsets in the tables. Last time I did it, I had to create a dump with one charset, drop the database, recreate it in utf-8 and restore the dump. Also, I had to change all "create table"-statements in the dump to create the tables in utf-8. I don't know if there is an easier way (now), but if you only have a few templates, you should consider correcting them inside OTRS Admin and then worry about the database at a later point in life. Lars From: otrs-bounces@otrs.org [mailto:otrs-bounces@otrs.org] On Behalf Of Neil Simpson Sent: Tuesday, August 23, 2011 2:55 PM To: otrs@otrs.org Subject: [otrs] Template char set issues Hello, Just upgraded from 2.4.7 and now all self-made templates do not show correctly. I have everything set to UTF-8 and yet i still have strange characters instead of the correct character. I have tried setting the UTF-8 options manually in each template/form but this does not effect it. the "page source" shows in the header " <meta http-equiv="Content-type" content="text/html;charset=utf-8" /> " so it should be set. if i manually paste some french/german text into the text field it is shown correctly, only if i use a template does it not show correctly. httpd.conf is default UTF-8. running out of ideas. thanks for any guidance. Neil

Hi, thanks for the tip lars. mysql looks like this currently: SHOW VARIABLES LIKE "character_set_%"; +--------------------------+----------------------------+ | Variable_name | Value | +--------------------------+----------------------------+ | character_set_client | latin1 | | character_set_connection | latin1 | | character_set_database | utf8 | | character_set_filesystem | binary | | character_set_results | latin1 | | character_set_server | latin1 | | character_set_system | utf8 | | character_sets_dir | /usr/share/mysql/charsets/ | +--------------------------+----------------------------+ i don't see how this has anything to do with the DB though. The templates are all in AgentTicketEmail.dtl. i have a toggle which shows/hides the templates and then you simply click a button for whichever template. an example template looks like:

Hi Neil, Sorry, I misunderstood you. I thought you were talking about replies, but you have in fact implemented templates in OTRS. Try and check out what charset your AgentTicketEmail.dtl is in. There's a very easy way to do that: file AgentTicketEmail.dtl If I do that, I get AgentTicketEmail.dtl: ASCII English text, with very long lines Guessing from the way the translation files for OTRS works, it could be that OTRS only accepts ISO-8859-1 as input and then converts it on the fly for output. If your AgentTicketEmail.dtl is in UTF-8, try converting it to ISO-8859-1, using this command: iconv --from-code=UTF-8 --to-code=ISO-8859-1 AgentTicketEmail.dtl >AgentTicketEmail.dtl.iso And then switch files around manually to see what works. Remember to restart httpd if you run mod_perl. Lars From: otrs-bounces@otrs.org [mailto:otrs-bounces@otrs.org] On Behalf Of Neil Simpson Sent: Tuesday, August 23, 2011 4:13 PM To: User questions and discussions about OTRS. Subject: Re: [otrs] Template char set issues Hi, thanks for the tip lars. mysql looks like this currently: SHOW VARIABLES LIKE "character_set_%"; +--------------------------+----------------------------+ | Variable_name | Value | +--------------------------+----------------------------+ | character_set_client | latin1 | | character_set_connection | latin1 | | character_set_database | utf8 | | character_set_filesystem | binary | | character_set_results | latin1 | | character_set_server | latin1 | | character_set_system | utf8 | | character_sets_dir | /usr/share/mysql/charsets/ | +--------------------------+----------------------------+ i don't see how this has anything to do with the DB though. The templates are all in AgentTicketEmail.dtl. i have a toggle which shows/hides the templates and then you simply click a button for whichever template. an example template looks like:
participants (2)
-
Lars Jørgensen
-
Neil Simpson