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