Changeset 88378 in spip-zone


Ignore:
Timestamp:
Apr 1, 2015, 9:16:02 AM (4 years ago)
Author:
maieul@…
Message:

pouvoir faire des test accentués

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _contribs_/pygments/trunk/test.py

    r88367 r88378  
    1010from pygments.formatters import HtmlFormatter
    1111from spip import spipLexer
     12import codecs
    1213
    13 
    14 code    = open('exemple.html','r').read()
    15 output  = open('output.html','w+')
    16 output.write('<html><head><style>'+HtmlFormatter().get_style_defs('.highlight')+'</style></head><body>')
     14code    = codecs.open('exemple.html','r','utf-8').read()
     15output  = codecs.open('output.html','w+','utf-8')
     16output.write('<html><head>'+'<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />'+'<style>'+HtmlFormatter().get_style_defs('.highlight')+'</style></head><body>')
    1717highlight(code, spipLexer(), HtmlFormatter(),output)
    1818
Note: See TracChangeset for help on using the changeset viewer.