[Tutor] How can I see properly my korean.

Young-gyu Park jackup at gmail.com
Thu May 31 12:20:19 CEST 2007


Yes I did

I added the locale code at the top of my python code.

What I want to do is that I want to convert to python dict to javascript
associative array.

and I will get the javascript array to display in the html page.

But the korean letter which is in the python dict is displayed raw format (
I can't find any appropriate expression ) such as \x0e\xed\xff

I want to see the korean letters like 라재 라재

how I convert the python dict to javascript array?


On 5/31/07, Alan Gauld <alan.gauld at btinternet.com> wrote:
>
> >I input the data which is from the database into array.
> > and then I print out the array to the file
> > but the letter I can not figure out.
> >
> >>         fileHandle = open (
> >> '/var/chroot/www/htdocs/django/js/model.js',
> >> 'w' )
> >>         fileHandle.write( codecs.BOM_UTF8 )
> >>         print >> fileHandle, 'var blog = '
> >>         print >> fileHandle, blog
> >>         fileHandle.close()
> >
> >
> > What I want to do is to see properly the letter not this letter
> > '\xec\x9d'
> >
> > Can anyone who know solution let me know how to do kindly?
>
> I think you need to set the locale at the top of your python code.
> I have no idea what you need to do in your JavaScript however.
>
> Alan G.
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070531/cb9dd977/attachment.htm 


More information about the Tutor mailing list