projects
/
tx
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
76fdc8c
)
Fixed prompt to correctly handle 8bits input.
author
Frederic Jolliton
<frederic@jolliton.com>
Wed, 7 Sep 2005 23:22:47 +0000
(23:22 +0000)
committer
Frederic Jolliton
<frederic@jolliton.com>
Wed, 7 Sep 2005 23:22:47 +0000
(23:22 +0000)
* Fixed prompt to correctly handle 8bits input, such as when using
Unicode terminal.
git-archimport-id: frederic@jolliton.com--2005-main/tx--main--0.1--patch-11
xpath_prompt.py
patch
|
blob
|
history
diff --git
a/xpath_prompt.py
b/xpath_prompt.py
index
25ee0dd
..
f7da328
100755
(executable)
--- a/
xpath_prompt.py
+++ b/
xpath_prompt.py
@@
-214,6
+214,10
@@
def main() :
except KeyboardInterrupt :
print
break
+ try :
+ line = line.decode( sys.stdin.encoding )
+ except :
+ print 'Error decoding input with encoding %r. Using raw input.' % ( sys.stdin.encoding , )
line = line.strip()
if line.startswith( '#' ) or not line :
pass