From: Brian Warner Date: Thu, 1 Nov 2007 22:42:57 +0000 (-0700) Subject: bencode.py: reencode as UTF-8 X-Git-Tag: allmydata-tahoe-0.7.0~303 X-Git-Url: https://git.rkrishnan.org/specifications/something?a=commitdiff_plain;h=57373c988903f35b0092297aa5f629622fb8a195;p=tahoe-lafs%2Ftahoe-lafs.git bencode.py: reencode as UTF-8 --- diff --git a/src/allmydata/util/bencode.py b/src/allmydata/util/bencode.py index 29bd185b..0cafa821 100644 --- a/src/allmydata/util/bencode.py +++ b/src/allmydata/util/bencode.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +# -*- coding: utf-8 -*- """ A library for streaming and unstreaming of simple objects, designed @@ -41,7 +42,7 @@ bencode('spam') == '4:spam' Unicode string objects are indicated with an initial u, a base 10 length-prefix, and the remaining bytes in utf-8 encoding. -bencode(u'\u00bfHabla espa\u00f1ol?') == 'ËHabla espaÐol?' +bencode(u'\u00bfHabla espa\u00f1ol?') == '¿Habla español?' Nulls are indicated by a single 'n'.