From 57373c988903f35b0092297aa5f629622fb8a195 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Thu, 1 Nov 2007 15:42:57 -0700 Subject: [PATCH] bencode.py: reencode as UTF-8 --- src/allmydata/util/bencode.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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'. -- 2.45.2