Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #24574
| References | <c67686b6-4f98-4408-a89c-edc0a6030c24@googlegroups.com> |
|---|---|
| Date | 2012-06-27 19:20 -0700 |
| Subject | Re: Is there any way to decode String using unknown codec? |
| From | Benjamin Kaplan <benjamin.kaplan@case.edu> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1580.1340850037.4697.python-list@python.org> (permalink) |
On Wed, Jun 27, 2012 at 6:14 PM, <howmuchistoday@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.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Is there any way to decode String using unknown codec? howmuchistoday@gmail.com - 2012-06-27 18:14 -0700
Re: Is there any way to decode String using unknown codec? Benjamin Kaplan <benjamin.kaplan@case.edu> - 2012-06-27 19:20 -0700
Re: Is there any way to decode String using unknown codec? howmuchistoday@gmail.com - 2012-06-28 14:27 -0700
Re: Is there any way to decode String using unknown codec? howmuchistoday@gmail.com - 2012-06-28 14:27 -0700
Re: Is there any way to decode String using unknown codec? MRAB <python@mrabarnett.plus.com> - 2012-06-28 12:28 +0100
Re: Is there any way to decode String using unknown codec? Dieter Maurer <dieter@handshake.de> - 2012-06-28 19:18 +0200
csiph-web