Improved unicode support
This commit is contained in:
parent
9b104d1f38
commit
2f667a5f22
|
|
@ -3,3 +3,5 @@ import netlist_reader
|
||||||
import units
|
import units
|
||||||
import component
|
import component
|
||||||
import sort
|
import sort
|
||||||
|
import preferences
|
||||||
|
import bom_writer
|
||||||
|
|
@ -182,7 +182,7 @@ class ComponentGroup():
|
||||||
def getField(self, field):
|
def getField(self, field):
|
||||||
if not field in self.fields.keys(): return ""
|
if not field in self.fields.keys(): return ""
|
||||||
if not self.fields[field]: return ""
|
if not self.fields[field]: return ""
|
||||||
return str(self.fields[field])
|
return u''.join((self.fields[field]))
|
||||||
|
|
||||||
def getCount(self):
|
def getCount(self):
|
||||||
return len(self.components)
|
return len(self.components)
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
import columns
|
import columns
|
||||||
from component import *
|
from component import *
|
||||||
import os
|
import os
|
||||||
|
|
@ -19,7 +20,7 @@ def bgColor(col):
|
||||||
return BG_USER
|
return BG_USER
|
||||||
|
|
||||||
def link(text):
|
def link(text):
|
||||||
text = str(text)
|
text = u''.join((text)).encode('utf-8').strip()
|
||||||
for t in ["http","https","ftp","www"]:
|
for t in ["http","https","ftp","www"]:
|
||||||
if text.startswith(t):
|
if text.startswith(t):
|
||||||
return '<a href="{t}">{t}</a>'.format(t=text)
|
return '<a href="{t}">{t}</a>'.format(t=text)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
# -*- coding: utf-8 -*-
|
# _*_ coding:utf-8 _*_
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue