Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #24637

Re: Is there any way to decode String using unknown codec?

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <howmuchistoday@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'broken': 0.03; 'interpreter': 0.04; 'raises': 0.07; 'sys,': 0.07; 'broken.': 0.09; 'codecs': 0.09; 'guys.': 0.09; 'subject:using': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python-list': 0.10; 'benjamin': 0.16; 'decode': 0.16; 'failed.': 0.16; 'korean.': 0.16; 'subject:String': 0.16; 'wed,': 0.16; 'wrote:': 0.17; 'os,': 0.22; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'tried': 0.25; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'received:209.85.212': 0.28; "i'm": 0.29; "skip:' 10": 0.30; 'error': 0.30; 'problem': 0.33; "can't": 0.34; 'received:google.com': 0.34; 'wrong': 0.34; 'pm,': 0.35; 'sometimes': 0.35; 'subject:?': 0.35; 'received:209.85': 0.35; 'there': 0.35; 'but': 0.36; 'modules': 0.36; 'thank': 0.36; 'being': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'from:no real name:2**0': 0.60; 'show': 0.63; 'subject:there': 0.65; 'subject:any': 0.84; 'received:209.85.212.56': 0.91
Newsgroups comp.lang.python
Date Thu, 28 Jun 2012 14:27:32 -0700 (PDT)
In-Reply-To <mailman.1580.1340850037.4697.python-list@python.org>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=210.117.199.100; posting-account=MbgxqAoAAACiGFd80Qtwxi2J7qp6KsRy
References <c67686b6-4f98-4408-a89c-edc0a6030c24@googlegroups.com> <mailman.1580.1340850037.4697.python-list@python.org>
User-Agent G2/1.0
X-Google-Web-Client true
X-Google-IP 210.117.199.100
MIME-Version 1.0
Subject Re: Is there any way to decode String using unknown codec?
From howmuchistoday@gmail.com
To comp.lang.python@googlegroups.com
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Message-ID <mailman.1622.1340918855.4697.python-list@python.org> (permalink)
Lines 21
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1340918855 news.xs4all.nl 6912 [2001:888:2000:d::a6]:35123
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:24637

Show key headers only | View raw


T

2012년 6월 28일 목요일 오전 11시 20분 28초 UTC+9, Benjamin Kaplan 님의 말:
> 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.

Thank you guys. The problem is solved!

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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