[FIX] Fix an encoding error
lp bug: https://launchpad.net/bugs/326054 fixed bzr revid: stephane@tinyerp.com-20090206092523-8bl7spf9qh4w7pdo
This commit is contained in:
parent
7e24105aa8
commit
d0f0ebb17f
|
@ -156,7 +156,7 @@ class char(_column):
|
|||
# we need to convert the string to a unicode object to be able
|
||||
# to evaluate its length (and possibly truncate it) reliably
|
||||
if isinstance(symb, str):
|
||||
u_symb = unicode(symb.replace('\xa0', '\xc2\xa0'), 'utf8')
|
||||
u_symb = unicode(symb, 'utf8')
|
||||
elif isinstance(symb, unicode):
|
||||
u_symb = symb
|
||||
else:
|
||||
|
|
|
@ -546,8 +546,8 @@ def trans_load_data(db_name, fileobj, fileformat, lang, strict=False, lang_name=
|
|||
'translatable': 1,
|
||||
'date_format' : str(locale.nl_langinfo(locale.D_FMT).replace('%y', '%Y')),
|
||||
'time_format' : str(locale.nl_langinfo(locale.T_FMT)),
|
||||
'decimal_point' : str(locale.localeconv()['decimal_point']),
|
||||
'thousands_sep' : str(locale.localeconv()['thousands_sep']),
|
||||
'decimal_point' : str(locale.localeconv()['decimal_point']).replace('\xa0', '\xc2\xa0'),
|
||||
'thousands_sep' : str(locale.localeconv()['thousands_sep']).replace('\xa0', '\xc2\xa0'),
|
||||
}
|
||||
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue