Edgewall Software
Modify

Opened 2 years ago

Closed 2 years ago

Last modified 6 months ago

#13471 closed defect (worksforme)

wrong display of non-ascii-characters in UTF-8-svg

Reported by: trac.domain.gauner@… Owned by:
Priority: normal Milestone:
Component: general Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by anonymous)

If I upload an svg file in UTF-8 encoding as an ticket attachment, containing Umlaute like ä, ö, ü, it diplays wrong characters for the umlaute.

Inside the ticket comment referencing the image, as well as on the attachment itself.

It seems not to be a problem of uploading, since on the server inside /env/files/attachments/ticket the svg is correctly, bitwise identical as I have uploaded it.

It is also not a question of my browser: If I open my original svg in Firefox, it displays correctly, if I open the one that trac delivers, either inside the ticket comment using the image, or directly under the raw-attachment/-URL or on the preview page under /attachment/ticket-URL, it fails. If I convert the svg from UTF-8 to ANSI and upload it, it works well. I already added svg to the trac.ini:

[mimeviewer]
mime_map = text/x-dylan:dylan,text/x-idl:ice,text/x-ada:ads:adb,image/svg+xml:svg
mime_map_patterns = text/plain:README(?!\.rst)|INSTALL(?!\.rst)|COPYING.*,image/svg+xml:.*svg

Attachments (0)

Change History (3)

comment:1 by anonymous, 2 years ago

Description: modified (diff)

comment:2 by Jun Omae, 2 years ago

Resolution: worksforme
Status: newclosed

Unable to reproduce it. demo-1.4/attachment/ticket/1050/test.svg. I consider your server has wrong configurations. Please ask on the MailingList for support questions.

comment:3 by anonymous, 2 years ago

Thank You for pointing me to the mailing list. Also there people pointed me in direction of our webserver (apache2).

After looking in the headers with curl, I saw that for our environment:

   Content-Type: image/svg+xml; charset=iso-8859-15

comes back, while from https://trac.edgewall.org/demo-1.4/raw-attachment/ticket/1050/test.svg

   Content-Type: image/svg+xml; charset=utf-8

comes back.

Then I searched all apache .confs - nowhere is set anything like AddDefaultCharset iso-8859-15 or AddCharset iso-8859-15 and even adding

   AddCharset utf-8 .svg

in the appropriate apache-trac.conf didn't have any effect.

Now I figured out, that there's a trac.ini setting:

   [trac]
   default_charset =  iso-8859-15
which has to go to
   [trac]
   default_charset = utf-8

With this all works well.

So, I appreciate all help I received, even though this time it was totally leading me in the wrong direction. ;-)

Last edited 2 years ago by Ryan J Ollos (previous) (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.