summaryrefslogtreecommitdiff
path: root/pygments/formatters/bbcode.py
diff options
context:
space:
mode:
Diffstat (limited to 'pygments/formatters/bbcode.py')
-rw-r--r--pygments/formatters/bbcode.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/pygments/formatters/bbcode.py b/pygments/formatters/bbcode.py
index 228c0a4d..a8663ea9 100644
--- a/pygments/formatters/bbcode.py
+++ b/pygments/formatters/bbcode.py
@@ -76,6 +76,7 @@ class BBCodeFormatter(Formatter):
lasttype = None
for ttype, value in tokensource:
+ value = value.encode(self.encoding)
while ttype not in self.styles:
ttype = ttype.parent
if ttype == lasttype: