Sun Jul 3 21:10:21 UTC 2005 Alberto Bertogli <albertogli@telpin.com.ar>
UNDO: Change an encode/decode pair to support Python 2.3
Skip decoding of an unicode string before encoding it in utf8, since it's not
supported by python 2.3
I have my doubts regarding this patch because I'm not sure removing the
decoding won't cause problems, but it went fine on my testing here using
latin1 and utf8 characters. I'd love to test it under a different encoding,
but I don't know any non-latin1 languages.
diff -rN -u old-darcsweb/darcsweb.cgi new-darcsweb/darcsweb.cgi
--- old-darcsweb/darcsweb.cgi 2013-08-10 12:09:27.000000000 +0000
+++ new-darcsweb/darcsweb.cgi 2013-08-10 12:09:27.000000000 +0000
@@ -73,7 +73,7 @@
if openpos < 0:
# small optimization to avoid the conversion to utf8 and
# entering the loop
- return s.encode('utf8')
+ return s.decode(config.repoencoding).encode('utf8')
s = s.encode(config.repoencoding).decode('raw_unicode_escape')
while openpos >= 0: