Ticket #4918 (closed defect: fixed)

Opened 3 years ago

Last modified 1 year ago

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

Reported by: anonymous Assigned to: rjollos
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

Change History

09/04/09 15:20:44 changed by anonymous

thanx! great patch!

01/22/10 00:31:03 changed by rjollos

  • summary changed from problems with cyrillic (or other unicode symbols in question) to [Patch] problem with cyrillic (or other unicode symbols in question).

08/27/10 21:35:43 changed by rjollos

  • owner changed from athomas to rjollos.

Reassigning ticket to new maintainer.

08/27/10 21:54:45 changed by rjollos

  • status changed from new to closed.
  • resolution set to fixed.

(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.

Add/Change #4918 ([Patch] problem with cyrillic (or other unicode symbols in question))




Change Properties
Action