bencode.py: reencode as UTF-8

This commit is contained in:
Brian Warner 2007-11-01 15:42:57 -07:00
parent 4423bc7510
commit 57373c9889

View File

@ -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'.