|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
unicode error sustainsHello, We,Translation Team again faced the same unicode problem while dumping data in gnowsys. It doesnt take unicode value for nid. It does accept the same for status as well as Title. We tried the following but it didnt work: 1. a=u'简体中文' 2. a='简体中文' a.encode('utf-8') 3. a='简体中文' a.encode('utf-16') 4. unicode('简体中文','latin-1').encode('utf-8') dict_at_preferred_encoding = { 'nid':'简体中文', 'uid':'1', 'status':'public', 'content':'', 'subtypeof':[], 'title':['HIMANSHU'], 'description':'', 'datatype':'varchar', 'subjecttypes':['po_file'] } print context.gnowql.manageAddAttributeType( dict_at_preferred_encoding ) return printed ERROR
Best Regards Himanshu Chauhan Forgot the famous last words? Access your message archive online. Click here. _______________________________________________ Gnowsys-help mailing list Gnowsys-help@... http://lists.gnu.org/mailman/listinfo/gnowsys-help |
|
|
Re: [Gnowsys-dev] unicode error sustainsOn Sat, Mar 1, 2008 at 11:10 PM, Himanshu Chauhan
<anshu781126@...> wrote: > > Hello, > We,Translation Team again faced the same unicode problem while dumping data > in gnowsys. > It doesnt take unicode value for nid. > It does accept the same for status as well as Title. > We tried the following but it didnt work: > 1. > a=u'简体中文' > 2. > a='简体中文' > a.encode('utf-8') > 3. > a='简体中文' > a.encode('utf-16') > 4. > unicode('简体中文','latin-1').encode('utf-8') > > > dict_at_preferred_encoding = { > 'nid':'简体中文', > 'uid':'1', > 'status':'public', > 'content':'', > 'subtypeof':[], > 'title':['HIMANSHU'], > 'description':'', > 'datatype':'varchar', > 'subjecttypes':['po_file'] > } > http://www.amk.ca/python/howto/unicode does the script containing the unicode has a line that looks like this: #!/usr/bin/env python # -*- coding: utf-8 -*- Nagarjuna _______________________________________________ Gnowsys-help mailing list Gnowsys-help@... http://lists.gnu.org/mailman/listinfo/gnowsys-help |
| Free embeddable forum powered by Nabble | Forum Help |