[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnowsys-help] Re: [Gnowsys-dev] unicode error sustains
From: |
Nagarjuna G. |
Subject: |
[Gnowsys-help] Re: [Gnowsys-dev] unicode error sustains |
Date: |
Mon, 3 Mar 2008 09:16:22 +0530 |
On Sat, Mar 1, 2008 at 11:10 PM, Himanshu Chauhan
<address@hidden> 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']
> }
>
The following link contains lot of help in doing unicode computing in Python.
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