示例#1
0
文件: scopes3.py 项目: AvdN/tdi
 def render_init(self, node):
     self.clear()
     encoding = node.raw.encoder.encoding
     self['file'] = decode(node[u'file'], encoding)
     self['width'] = decode(node[u'width'], encoding)
     self['height'] = decode(node[u'height'], encoding)
     self['param'] = []
     node.render()
     node.remove()
示例#2
0
文件: scopes3.py 项目: AvdN/tdi
 def render_param(self, node):
     encoding = node.raw.encoder.encoding
     self['param'].append((
         decode(node[u'name'], encoding),
         decode(node[u'value'], encoding),
     ))
示例#3
0
#!/usr/bin/env python
import warnings as _warnings
_warnings.resetwarnings()
_warnings.filterwarnings('error')

# BEGIN INCLUDE
from tdi.tools import html

result = html.decode('André Malo, \x80', 'cp1252')
print result.encode('unicode_escape')
print result.encode('utf-8')