Modify

Opened 16 years ago

Closed 14 years ago

#4918 closed defect (fixed)

[Patch] problem with cyrillic (or other unicode symbols in question)

Reported by: anonymous Owned by: Ryan J Ollos
Priority: normal Component: PollMacro
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

I'm install this plugin on my trac, but I have problem with cyrillic only symbols questions, I can't add more then one poll with error on next poll "Stored poll is not the same as this one.", all polls was saved in one file, named ".poll"

this patch fix the problem


Index: pollmacro/0.11/tracpoll/tracpoll.py
===================================================================
--- pollmacro/0.11/tracpoll/tracpoll.py (revision 5516)
+++ pollmacro/0.11/tracpoll/tracpoll.py (working copy)
@@ -15,7 +15,7 @@
         self.vote_defs = vote_defs
         self.title = title
         # Perhaps the Wiki page name should be included?
-        self.key = ''.join(re.findall(r'(\w+)', title)).lower()
+        self.key = ''.join(re.findall(r'(\w+)', title ,re.UNICODE)).lower()
         self.store = os.path.join(base_dir, self.key + '.poll')
         self.load()

please incude this in your project. Thank you.

Attachments (0)

Change History (4)

comment:1 Changed 15 years ago by anonymous

thanx! great patch!

comment:2 Changed 15 years ago by Ryan J Ollos

Summary: problems with cyrillic (or other unicode symbols in question)[Patch] problem with cyrillic (or other unicode symbols in question)

comment:3 Changed 14 years ago by Ryan J Ollos

Owner: changed from Alec Thomas to Ryan J Ollos

Reassigning ticket to new maintainer.

comment:4 Changed 14 years ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

(In [8466]) - Added new maintainer to setup.py.

  • Removed requirement for TICKET_VIEW permissions in order to view the poll. Fixes #1632.
  • Fixed unicode issue that was preventing more than one poll in some instances. Fixes #4918.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.