Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #40437
| Path | csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <gandalf@shopzeus.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.000 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; 'encoded': 0.05; 'error:': 0.05; '-*-': 0.07; 'encoding:': 0.07; 'utf-8': 0.07; 'python': 0.09; 'content:': 0.09; 'encoding.': 0.09; 'subject:python': 0.11; 'encoding': 0.15; 'command:': 0.16; 'editor,': 0.16; 'exception?': 0.16; 'help?': 0.16; 'shell:': 0.16; 'unsupported': 0.16; 'wrote:': 0.17; 'input': 0.18; 'subject:problem': 0.22; 'example': 0.23; "python's": 0.23; 'to:2**1': 0.23; 'header:In-Reply-To:1': 0.25; 'header:User- Agent:1': 0.26; 'creating': 0.26; 'run': 0.28; 'maybe': 0.29; 'error': 0.30; 'compatible': 0.30; 'file': 0.32; 'to:no real name:2**1': 0.32; 'problem': 0.33; 'to:addr:python-list': 0.33; '(with': 0.33; 'characters': 0.36; 'best,': 0.37; 'subject:: ': 0.38; 'supports': 0.38; 'sure': 0.38; 'gives': 0.39; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'received:192.168': 0.40; 'your': 0.60; 'save': 0.61; 'email addr:gmail.com': 0.63; 'received:204': 0.72 |
| Date | Mon, 04 Mar 2013 10:57:41 +0100 |
| From | Laszlo Nagy <gandalf@shopzeus.com> |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130221 Thunderbird/17.0.3 |
| MIME-Version | 1.0 |
| To | yomnasalah91@gmail.com, python-list@python.org |
| Subject | Re: Encoding problem in python |
| References | <a70649cf-4b66-431f-bc97-e9af38b18e54@googlegroups.com> |
| In-Reply-To | <a70649cf-4b66-431f-bc97-e9af38b18e54@googlegroups.com> |
| Content-Type | text/plain; charset=UTF-8; format=flowed |
| Content-Transfer-Encoding | 8bit |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| 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> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2832.1362391640.2939.python-list@python.org> (permalink) |
| Lines | 33 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1362391640 news.xs4all.nl 6864 [2001:888:2000:d::a6]:57003 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:40437 |
Show key headers only | View raw
On 2013-03-04 10:37, yomnasalah91@gmail.com wrote:
> I have a problem with encoding in python 27 shell.
>
> when i write this in the python shell:
>
> w=u'العربى'
>
> It gives me the following error:
>
> Unsupported characters in input
>
> any help?
Maybe it is not Python related. Did you get an exception? Can you send a
full traceback? I suspect that the error comes from your terminal, and
not Python. Please make sure that your terminal supports UTF-8 encoding.
Alternatively, try creating a file with this content:
# -*- encoding: UTF-8 -*-
w=u'العربى'
Save it as UTF-8 encoded file "test.py" (with an UTF-8 compatible
editor, for example Geany) and run it as a command:
python test.py
If it works then it is sure that the problem is with your terminal. It
will be an OS limitation, not Python's limitation.
Best,
Laszlo
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Encoding problem in python yomnasalah91@gmail.com - 2013-03-04 01:37 -0800 Re: Encoding problem in python Laszlo Nagy <gandalf@shopzeus.com> - 2013-03-04 10:57 +0100 Re: Encoding problem in python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-03-04 10:18 +0000 Re: Encoding problem in python Vlastimil Brom <vlastimil.brom@gmail.com> - 2013-03-04 14:39 +0100
csiph-web