From 242cc48eea399171e9ce108c753f9e23bdb8ddb4 Mon Sep 17 00:00:00 2001 From: PyYoshi Date: Wed, 8 May 2013 14:11:04 +0900 Subject: [PATCH] readme: update benchmark result and example codes --- README.markdown | 4 ++-- README.rst | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.markdown b/README.markdown index 0c73d59..892dc76 100644 --- a/README.markdown +++ b/README.markdown @@ -67,7 +67,7 @@ $ sudo easy_install cchardet ```python # -*- coding: utf-8 -*- import cchardet as chardet -with open(r"test/testdata/wikipediaJa_One_Thousand_and_One_Nights_SJIS.txt") as f: +with open(r"test/testdata/wikipediaJa_One_Thousand_and_One_Nights_SJIS.txt", "rb") as f: msg = f.read() result = chardet.detect(msg) print(result) @@ -103,7 +103,7 @@ Platform: Kubuntu 12.04 amd64, Python 2.7.3 64-bit chardet0.32 - cchardet1012.97 + cchardet975.46 diff --git a/README.rst b/README.rst index 8fc3fd8..3b5ecb7 100644 --- a/README.rst +++ b/README.rst @@ -76,7 +76,7 @@ Example # -*- coding: utf-8 -*- import cchardet as chardet - with open(r"test/testdata/wikipediaJa_One_Thousand_and_One_Nights_SJIS.txt") as f: + with open(r"test/testdata/wikipediaJa_One_Thousand_and_One_Nights_SJIS.txt", "rb") as f: msg = f.read() result = chardet.detect(msg) print(result) @@ -115,7 +115,7 @@ Result: chardet: 0.32 (call/s) - cchardet: 1012.97 (call/s) + cchardet: 975.32 (call/s) License --------------