~mdw
/
sgt
/
utils
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Output a just-read character _before_ reading the next byte. Causes
[sgt/utils]
/
cvt-utf8
/
cvt-utf8
diff --git
a/cvt-utf8/cvt-utf8
b/cvt-utf8/cvt-utf8
index
c586347
..
c3ba0a3
100755
(executable)
--- a/
cvt-utf8/cvt-utf8
+++ b/
cvt-utf8/cvt-utf8
@@
-180,12
+180,12
@@
def process_utf8(next):
char.append(c)
acc = (acc << 6) + (c & 0x3F)
cbytes = cbytes - 1
char.append(c)
acc = (acc << 6) + (c & 0x3F)
cbytes = cbytes - 1
- if not gotone:
- c = next()
if cbytes > 0:
output(-1, char, " (incomplete sequence)")
else:
process_ucs(acc, char)
if cbytes > 0:
output(-1, char, " (incomplete sequence)")
else:
process_ucs(acc, char)
+ if not gotone:
+ c = next()
def do(args):
# Class to turn a list into a callable object that returns one
def do(args):
# Class to turn a list into a callable object that returns one