Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #100013
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | "D'Arcy J.M. Cain" <darcy@VybeNetworks.com> |
| Newsgroups | comp.lang.python |
| Subject | Unicode failure |
| Date | Fri, 4 Dec 2015 13:07:38 -0500 |
| Organization | Vybe Networks Inc. |
| Lines | 27 |
| Message-ID | <mailman.205.1449268365.14615.python-list@python.org> (permalink) |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=US-ASCII |
| Content-Transfer-Encoding | 7bit |
| X-Trace | news.uni-berlin.de /70OKAlmbzuJzK39Vm7KKQ2w31wxLk3/LWas72JkGW1w== |
| Return-Path | <darcy@VybeNetworks.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.003 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'sys': 0.05; '-*-': 0.07; 'skip:/ 10': 0.07; 'utf-8': 0.07; 'coding:': 0.09; 'encode': 0.09; 'python': 0.10; 'codec': 0.16; 'missing?': 0.16; 'ordinal': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'stuff.': 0.16; 'subject:Unicode': 0.16; 'script.': 0.18; 'seems': 0.23; 'import': 0.24; '(most': 0.24; 'character': 0.29; "can't": 0.32; 'traceback': 0.33; 'file': 0.34; 'unicode': 0.35; 'skip:p 30': 0.35; 'but': 0.36; 'to:addr:python-list': 0.36; 'thought': 0.37; 'charset:us-ascii': 0.37; 'to:addr:python.org': 0.40; 'mark': 0.40; 'still': 0.40; 'skip:u 10': 0.61; 'here': 0.66; '3.4': 0.84; 'received:98.158': 0.84 |
| X-Mailer | Claws Mail 3.9.3 (GTK+ 2.24.23; x86_64-pc-linux-gnu) |
| X-Mailman-Approved-At | Fri, 04 Dec 2015 17:32:44 -0500 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.20+ |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://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 | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Xref | csiph.com comp.lang.python:100013 |
Show key headers only | View raw
I thought that going to Python 3.4 would solve my Unicode issues but it
seems I still don't understand this stuff. Here is my script.
#! /usr/bin/python3
# -*- coding: UTF-8 -*-
import sys
print(sys.getdefaultencoding())
print(u"\N{TRADE MARK SIGN}")
And here is my output.
utf-8
Traceback (most recent call last):
File "./g", line 5, in <module>
print(u"\N{TRADE MARK SIGN}")
UnicodeEncodeError: 'ascii' codec can't encode character '\u2122' in
position 0: ordinal not in range(128)
What am I missing?
TIA.
--
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:darcy@Vex.Net VoIP: sip:darcy@VybeNetworks.com
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Unicode failure "D'Arcy J.M. Cain" <darcy@VybeNetworks.com> - 2015-12-04 13:07 -0500
Re: Unicode failure Dave Farrance <df@see.replyto.invalid> - 2015-12-06 09:06 +0000
Re: Unicode failure Dave Farrance <df@see.replyto.invalid> - 2015-12-06 09:16 +0000
Re: Unicode failure Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-12-06 09:34 +0000
Re: Unicode failure Random832 <random832@fastmail.com> - 2015-12-06 15:36 -0500
Re: Unicode failure Quivis <quivis@domain.invalid> - 2015-12-06 23:09 +0000
Re: Unicode failure Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2015-12-07 10:48 +0000
csiph-web