Is there any way to decode String using unknown codec?

howmuchistoday at gmail.com howmuchistoday at gmail.com
Thu Jun 28 17:27:32 EDT 2012


T

2012년 6월 28일 목요일 오전 11시 20분 28초 UTC+9, Benjamin Kaplan 님의 말:
> On Wed, Jun 27, 2012 at 6:14 PM,  <howmuchistoday at gmail.com> wrote:
> > Hi
> > I'm a Korean and when I use modules like sys, os, &c,
> > sometimes the interpreter show me broken strings like
> > '\x13\xb3\x12\xc8'.
> > It mustbe the Korean "alphabet" but I can't decode it to the rightway.
> > I tried to decode it using codecs like cp949,mbcs,utf-8
> > but It failed.
> > The only way I found is eval('\x13\xb3\x12\xc8').
> > It raises an Error with showing right Korean.
> > Is there any way to deal it being not broken?
> > --
> 
> It's not broken. You're just using the wrong encodings. Try utf-16le.

Thank you guys. The problem is solved!



More information about the Python-list mailing list