Re: [patch] UnicodeDecodeError in tools.Replacer.replace with non-ascii ch
Бондаренко Андрей Витальевич <[email protected]> Wed, 8 Jul 2009 08:04:08 +0600
| Newsgroups | gmane.comp.web.pyblosxom.devel |
|---|---|
| Message-ID | <8F048E189BF2D84C8F2604829BFC4C8A336E851028@MSE-CCR-MB2.hq.corp.mmk.chel.su> |
Yes. Changing _VAR_REGEXP to a byte string resolves the issue too.
Index: tools.py
===================================================================
--- tools.py (revision 1330)
+++ tools.py (working copy)
@@ -33,7 +33,7 @@
MONTHS = None
# regular expression for detection and substituion of variables.
-_VAR_REGEXP = re.compile(ur"""
+_VAR_REGEXP = re.compile(r"""
(?<!\\) # if the $ is escaped, then this isn't a variable
\$ # variables start with a $
(
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Pyblosxom-devel mailing list
Pyblosxom-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/pyblosxom-devel