summaryrefslogtreecommitdiff
path: root/pygments/formatters/terminal.py
diff options
context:
space:
mode:
authorgbrandl <devnull@localhost>2006-10-31 23:46:24 +0100
committergbrandl <devnull@localhost>2006-10-31 23:46:24 +0100
commit729df9d55ee975be89f18fa90964f19bead60feb (patch)
tree641a0511cbcfa260d1d4e2287f0ede38e50504d8 /pygments/formatters/terminal.py
parent026d59d92a7b574323484fae8a21c9bcc2401517 (diff)
downloadpygments-729df9d55ee975be89f18fa90964f19bead60feb.tar.gz
[svn] Add encoding support. All processing is now done with unicode strings.
Diffstat (limited to 'pygments/formatters/terminal.py')
-rw-r--r--pygments/formatters/terminal.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/pygments/formatters/terminal.py b/pygments/formatters/terminal.py
index b1756c54..11f0b26a 100644
--- a/pygments/formatters/terminal.py
+++ b/pygments/formatters/terminal.py
@@ -79,6 +79,7 @@ class TerminalFormatter(Formatter):
def format(self, tokensource, outfile):
dbg = self.debug
for ttype, value in tokensource:
+ value = value.encode(self.encoding)
color = self.colorscheme.get(ttype)
while color is None:
ttype = ttype[:-1]