From cbd3f2d8c2292168a03a7f0319905e05428393b1 Mon Sep 17 00:00:00 2001 From: "chunyang.wen" <chunyang.wen@gmail.com> Date: Tue, 17 Nov 2015 13:08:26 +0800 Subject: [PATCH] update a new method for Chinese --- Python/unicode_repr_1.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Python/unicode_repr_1.py diff --git a/Python/unicode_repr_1.py b/Python/unicode_repr_1.py new file mode 100644 index 0000000..9e328b2 --- /dev/null +++ b/Python/unicode_repr_1.py @@ -0,0 +1,8 @@ +#!bin/env python +#-*-coding=utf-8-*- + +import sys + +for line in sys.stdin: + line = line[:-1] + print repr(line.decode('gbk')).replace("u\'","").replace("\'","")