Edgewall Software
Modify

Opened 14 years ago

Closed 13 years ago

#8710 closed defect (fixed)

Change default encoding for mimeview to UTF-8 from ISO-8859-15

Reported by: anatoly techtonik <techtonik@…> Owned by: Christian Boos
Priority: normal Milestone: 1.0
Component: rendering Version: 0.11.5
Severity: trivial Keywords: unicode
Cc: Branch:
Release Notes:

[trac] default_charset now defaults to "utf-8"

API Changes:
Internal Changes:

Description

This is patch from Debian package http://packages.debian.org/sid/trac

  • trac/mimeview/api.py

    #! /bin/sh /usr/share/dpatch/dpatch-run
    ## 30_default_charset_utf8.dpatch by  <wmb@beron.tangosoft.com>
    ##
    ## All lines beginning with `## DP:' are a description of the patch.
    ## DP: Use UTF-8 as default charset
    
    @DPATCH@
    
    diff -uraN trac-0.11.5.orig/trac/mimeview/api.py trac-0.11.5/trac/mimeview/api.py
    old new  
    579579    annotators = ExtensionPoint(IHTMLPreviewAnnotator)
    580580    converters = ExtensionPoint(IContentConverter)
    581581
    582     default_charset = Option('trac', 'default_charset', 'iso-8859-15',
     582    default_charset = Option('trac', 'default_charset', 'utf-8',
    583583        """Charset to be used when in doubt.""")
    584584
    585585    tab_width = IntOption('mimeviewer', 'tab_width', 8,

Attachments (0)

Change History (4)

comment:1 by Christian Boos, 14 years ago

Component: generalrendering
Keywords: unicode added
Milestone: 0.12.1

'utf-8' is not as safe as a default as 'iso-8859-15' is (any byte sequence can be converted to unicode when using 'iso-8859-15', which is not the case for 'utf-8').

But I agree that 'utf-8' is probably a more useful default than 'iso-8859-15' is.

So first we would have to try if changing this setting wouldn't result in UnicodeEncode exceptions in places this default_charset setting is used.

comment:2 by anatoly techtonik <techtonik@…>, 14 years ago

Can we build a list of such places to test?

comment:3 by Christian Boos, 13 years ago

Milestone: next-minor-0.12.x0.13
Owner: set to Christian Boos
Release Notes: modified (diff)

No changes to defaults on minor releases.

comment:4 by Christian Boos, 13 years ago

Resolution: fixed
Severity: normaltrivial
Status: newclosed

Done in r10426.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos 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.