Edgewall Software
Modify

Opened 20 years ago

Closed 19 years ago

#859 closed defect (duplicate)

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

Reported by: anonymous Owned by: Jonas Borgström
Priority: normal Milestone:
Component: admin/console Version: devel
Severity: major Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal 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 (0)

Change History (15)

comment:1 by anonymous, 20 years ago

Priority: normalhighest

comment:2 by Nathan Miller <nxmiller@…>, 20 years ago

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 by anonymous, 20 years ago

Resolution: fixed
Status: newclosed

comment:4 by Christopher Lenz, 20 years ago

Resolution: fixed
Status: closedreopened

Don't close as anonymous or without a comment.

comment:5 by mr700@…, 20 years ago

With Red Hat 9 and Fedora Core ½/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 by anonymous, 20 years ago

Owner: changed from daniel to anonymous
Status: reopenednew

comment:7 by anonymous, 20 years ago

Resolution: fixed
Status: newclosed

comment:8 by Matthew Good, 20 years ago

Resolution: fixed
Status: closedreopened

Please don't close without a comment.

comment:9 by anonymous, 20 years ago

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

comment:10 by anonymous, 20 years ago

dfgjkdlgj

comment:11 by linas, 20 years ago

Component: trac-admingeneral
Keywords: aaaa added
Priority: highestnormal
Severity: criticalmajor
Version: devel0.6.1

testuojam

comment:12 by Matthew Good, 20 years ago

Component: generaltrac-admin
Keywords: aaaa removed
Version: 0.6.1devel

Please don't abuse the system

comment:13 by Emmanuel Blot, 19 years ago

Owner: anonymous removed
Status: reopenednew

comment:14 by Emmanuel Blot, 19 years ago

Owner: set to Jonas Borgström

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 by Christian Boos, 19 years ago

Resolution: duplicate
Status: newclosed

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

Modify Ticket

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