Show More
@@ -101,7 +101,7 b' def _buildencodefun():' | |||||
101 | e = '_' |
|
101 | e = '_' | |
102 | if pycompat.ispy3: |
|
102 | if pycompat.ispy3: | |
103 | xchr = lambda x: bytes([x]) |
|
103 | xchr = lambda x: bytes([x]) | |
104 | asciistr = [bytes(a) for a in range(127)] |
|
104 | asciistr = [bytes([a]) for a in range(127)] | |
105 | else: |
|
105 | else: | |
106 | xchr = chr |
|
106 | xchr = chr | |
107 | asciistr = map(chr, xrange(127)) |
|
107 | asciistr = map(chr, xrange(127)) | |
@@ -128,7 +128,7 b' def _buildencodefun():' | |||||
128 | pass |
|
128 | pass | |
129 | else: |
|
129 | else: | |
130 | raise KeyError |
|
130 | raise KeyError | |
131 | return (lambda s: ''.join([cmap[c] for c in s]), |
|
131 | return (lambda s: ''.join([cmap[s[c:c + 1]] for c in xrange(len(s))]), | |
132 | lambda s: ''.join(list(decode(s)))) |
|
132 | lambda s: ''.join(list(decode(s)))) | |
133 |
|
133 | |||
134 | _encodefname, _decodefname = _buildencodefun() |
|
134 | _encodefname, _decodefname = _buildencodefun() |
General Comments 0
You need to be logged in to leave comments.
Login now