Edgewall Software
Modify

Ticket #859 (closed defect: duplicate)

Opened 7 years ago

Last modified 6 years ago

trac-admin does not convert national characters to utf-8 and back

Reported by: anonymous Owned by: jonas
Priority: normal Milestone:
Component: admin/console Version: devel
Severity: major Keywords:
Cc:
Release Notes:
API Changes:

Description

all characters entered from keyboard (for example 'component add "national-characters-here") go to the database without converting to utf-8.
so in web interface they are shown incorrectly.

Attachments

Change History

comment:1 Changed 7 years ago by anonymous

  • Priority changed from normal to highest

comment:2 Changed 7 years ago by Nathan Miller <nxmiller@…>

31a32
> import locale
37a39,47
> def to_utf8(s):
>     return unicode(s,locale.getdefaultlocale()[1]).encode('utf-8')
> 
> def from_utf8(s):
>     try:
>         return s.decode('utf-8')
>     except UnicodeError:
>         return s
> 
170a181
>                 cell = from_utf8(cell)
181c192
<                 print ("%%-%ds%s" % (colw[cnum], sp)) % (ldata[rnum][cnum] or ''),
---
>                 print ("%%-%ds%s" % (colw[cnum], sp)) % (from_utf8(ldata[rnum][cnum]) or ''),
988c999
<                 tracadm.docmd (command)
---
>                 tracadm.docmd (to_utf8(command))

comment:3 Changed 7 years ago by anonymous

  • Resolution set to fixed
  • Status changed from new to closed

comment:4 Changed 7 years ago by cmlenz

  • Resolution fixed deleted
  • Status changed from closed to reopened

Don't close as anonymous or without a comment.

comment:5 Changed 7 years ago by mr700@…

With Red Hat 9 and Fedora Core 1/2/3 all entered text is in utf-8 unless you change the default setup. Shouldn't this be checked before converting from and to utf-8? With FC3 I have only a small problem with trac-admin while erasing multibyte characters with backspace, but this is going to be fixed soon I hope :)

comment:6 Changed 7 years ago by anonymous

  • Owner changed from daniel to anonymous
  • Status changed from reopened to new

comment:7 Changed 7 years ago by anonymous

  • Resolution set to fixed
  • Status changed from new to closed

comment:8 Changed 7 years ago by mgood

  • Resolution fixed deleted
  • Status changed from closed to reopened

Please don't close without a comment.

comment:9 Changed 7 years ago by anonymous

well all that sounds very good i love this applicatoin - it is great
thx

comment:10 Changed 7 years ago by anonymous

dfgjkdlgj

comment:11 Changed 7 years ago by linas

  • Component changed from trac-admin to general
  • Keywords aaaa added
  • Priority changed from highest to normal
  • Severity changed from critical to major
  • Version changed from devel to 0.6.1

testuojam

comment:12 Changed 7 years ago by mgood

  • Component changed from general to trac-admin
  • Keywords aaaa removed
  • Version changed from 0.6.1 to devel

Please don't abuse the system

comment:13 Changed 6 years ago by eblot

  • Owner anonymous deleted
  • Status changed from reopened to new

comment:14 Changed 6 years ago by eblot

  • Owner set to jonas

This incident is probably tied to #2394.

(sorry for the new status instead of reopened, clearing out the owner seems to reset the status)

comment:15 Changed 6 years ago by cboos

  • Resolution set to duplicate
  • Status changed from new to closed

This has been fixed by r3114. See also #2186.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from jonas. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.