Permalink
Browse files

If input is not UTF-8 assume it to be latin1

  • Loading branch information...
1 parent 32347b5 commit a26fbb87b4d88987c67459926db131f5e44892d4 @splitbrain splitbrain committed May 25, 2009
Showing with 2 additions and 0 deletions.
  1. +2 −0 syntax.php
View
@@ -113,6 +113,8 @@ function render($mode, &$renderer, $opt) {
} else {
$file = mediaFN($opt['file']);
$opt['content'] = io_readFile($file);
+ // if not valid UTF-8 is given we assume ISO-8859-1
+ if(!utf8_check($opt['content'])) $opt['content'] = utf8_encode($opt['content']);
}
}

0 comments on commit a26fbb8

Please sign in to comment.