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


Groups > comp.lang.python > #94395

Re: Encoding of Python 2 string literals

Path csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
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; 'subject:Python': 0.05; 'from:addr:yahoo.co.uk': 0.05; '-*-': 0.07; 'constructor': 0.07; 'utf-8': 0.07; 'coding:': 0.09; 'literal': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:string': 0.09; 'tracker,': 0.09; 'bug': 0.10; 'python': 0.10; 'encoding': 0.15; 'anatoly': 0.16; 'file?': 0.16; 'handshake': 0.16; 'migration.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'wrote:': 0.16; 'contribute': 0.16; 'string': 0.17; 'language': 0.19; 'library': 0.20; 'lawrence': 0.22; 'defined': 0.23; 'help.': 0.23; 'import': 0.24; 'header:In-Reply-To:1': 0.24; 'header:User- Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'community.': 0.27; 'question': 0.27; "i'm": 0.30; 'you?': 0.30; 'entry': 0.31; 'language.': 0.32; 'point': 0.33; 'source': 0.33; 'definition': 0.34; 'knowledge': 0.35; 'but': 0.36; 'should': 0.36; 'there': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'virtual': 0.38; 'several': 0.38; 'mailing': 0.38; 'hi,': 0.38; 'to:addr:python.org': 0.40; 'mark': 0.40; 'still': 0.40; 'your': 0.60; 'please,': 0.63; 'our': 0.64; 'banned': 0.84; 'pythonistas,': 0.84; 'source:': 0.84; 'dare': 0.91; 'received:2': 0.93; 'refuse': 0.93
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Mark Lawrence <breamoreboy@yahoo.co.uk>
Subject Re: Encoding of Python 2 string literals
Date Wed, 22 Jul 2015 21:30:07 +0100
References <CAPkN8xK674+ruL=2gU9xHsuDAY0H3D_CBux8mY78ZYzo55gdHw@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 8bit
X-Gmane-NNTP-Posting-Host host-2-98-201-140.as13285.net
User-Agent Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0
In-Reply-To <CAPkN8xK674+ruL=2gU9xHsuDAY0H3D_CBux8mY78ZYzo55gdHw@mail.gmail.com>
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>
Newsgroups comp.lang.python
Message-ID <mailman.881.1437597031.3674.python-list@python.org> (permalink)
Lines 38
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1437597031 news.xs4all.nl 2944 [2001:888:2000:d::a6]:34360
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:94395

Show key headers only | View raw


On 22/07/2015 11:17, anatoly techtonik wrote:
> Hi,
>
> Is there a way to know encoding of string (bytes) literal
> defined in source file? For example, given that source:
>
>      # -*- coding: utf-8 -*-
>      from library import Entry
>      Entry("текст")
>
> Is there any way for Entry() constructor to know that
> string "текст" passed into it is the utf-8 string?
>
> I need to better prepare SCons for Python 3 migration.
>
> Please, CC.
> --
> anatoly t.
>
>

Without question you are the most appalling person who should by 
definition be excluded from the Python community.  You refuse point 
blank to contribute to the bug tracker, you've already been banned from 
several mailing lists, but still you have the audacity to ask for help. 
  How dare you?

@Rick Johnston considering the above and the fact that I have spoken up 
in support of you in the past regarding your knowledge of tkinter/IDLE, 
I'm perfectly happy to call a truce regarding our litle spiff over the 
last couple of days.  Virtual handshake over the Atlantic Ocean?

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

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


Thread

Re: Encoding of Python 2 string literals Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-07-22 21:30 +0100

csiph-web