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: [email protected] [mailto:[email protected]] 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:

<form action="$Env{"CGIHandle"}" method="post" enctype="multipart/form-data" 
id="Template95">
                                <input type="hidden" name="Action" 
value="$Env{"Action"}"/>
                                <input type="hidden" name="Subaction" 
value="StoreNew"/>
                                <input type="hidden" name="ServiceID" 
value="23"/> <!-- Operations::User Management -->
                                <input type="hidden" name="TypeID" value="20"/> 
<!-- Operation -->
                                <input type="hidden" name="Dest" value="20||2nd 
Level::Technical Support"/>
                                <input type="hidden" name="FormID" 
value="$QData{"FormID"}"/>
                                <input type="hidden" name="CustomerID" 
value="091007251053349620001C"/> <!-- Dead Letter Office -->
                                <input type="hidden" 
name="SelectedCustomerUser" value=""/> <!-- "Enter User Details Here" -->
                                <input type="hidden" name="ExpandCustomerName" 
value="2"/>
                                <input type="hidden" name="Cc" value=""/>
                                <input type="hidden" name="NextStateID" 
value="2"/>
                                <input type="hidden" name="Subject" value="Your 
private cert"/>
                                <input type="hidden" name="Body" value="
Dear ,
<br>
Chèr(e) utilisateur, utilisétrice,
etc etc
"/>
</form>

As you can see from the body text it shows correctly in the 
AgentTicketEmail.dtl but not when selected inside of otrs even though the page 
source says it's using utf-8.

You mentioned changing the templates in otrs admin, where is that an option, i 
don't know of anywhere i can do that.

thanks in advance

Neil


On Tue, Aug 23, 2011 at 3:38 PM, Lars Jørgensen <[email protected]<mailto:[email protected]>> 
wrote:
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: [email protected]<mailto:[email protected]> 
[mailto:otrs-bounces@otrs<mailto:otrs-bounces@otrs>.org] On Behalf Of Neil 
Simpson
Sent: Tuesday, August 23, 2011 2:55 PM
To: [email protected]<mailto:[email protected]>
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

---------------------------------------------------------------------
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs

---------------------------------------------------------------------
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs

Reply via email to