On Sun, 6 Dec 2015 at 23:11 Quivis wrote:
> On Fri, 04 Dec 2015 13:07:38 -0500, D'Arcy J.M. Cain wrote:
>
> > 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.
> >
> > #!
"D'Arcy J.M. Cain" wrote:
>On Fri, 4 Dec 2015 18:28:22 -0500
>Terry Reedy wrote:
>> Tk widgets, and hence IDLE windows, will print any character from
>> \u to \u without raising, even if the result is blank or ?.
>> Higher codepoints fail, but
I was taking it for granted that you knew how to set environment
variables, but just in case you don't: In the shell, (are you using
BASH?), put this:
export PYTHONIOENCODING=UTF-8
...then run your script.
Remember that this is *not* a permanent fix.
--
"D'Arcy J.M. Cain" wrote:
>...
>utf-8
>Traceback (most recent call last):
> File "./g", line 5, in
>print(u"\N{TRADE MARK SIGN}")
>UnicodeEncodeError: 'ascii' codec can't encode character '\u2122' in
>position 0: ordinal not in range(128)
I *presume* that you're
On 06/12/2015 09:06, Dave Farrance wrote:
"D'Arcy J.M. Cain" wrote:
...
utf-8
Traceback (most recent call last):
File "./g", line 5, in
print(u"\N{TRADE MARK SIGN}")
UnicodeEncodeError: 'ascii' codec can't encode character '\u2122' in
position 0: ordinal not in
Mark Lawrence writes:
> On 06/12/2015 09:06, Dave Farrance wrote:
>> "D'Arcy J.M. Cain" wrote:
>>> utf-8
>>> Traceback (most recent call last):
>>> File "./g", line 5, in
>>> print(u"\N{TRADE MARK SIGN}")
>>> UnicodeEncodeError: 'ascii'
On Sat, Dec 5, 2015 at 12:10 AM, Chris Angelico wrote:
> On Sat, Dec 5, 2015 at 5:06 PM, Terry Reedy wrote:
>> On 12/4/2015 10:22 PM, Random832 wrote:
>>>
>>> On 2015-12-04, Terry Reedy wrote:
Tk widgets, and hence IDLE windows,
On Fri, 4 Dec 2015 18:28:22 -0500
Terry Reedy wrote:
> Tk widgets, and hence IDLE windows, will print any character from
> \u to \u without raising, even if the result is blank or �.
> Higher codepoints fail, but allowing the entire BMP is better than
> any Windows
On 2015-12-05, Terry Reedy wrote:
> On 12/4/2015 10:22 PM, Random832 wrote:
>> Well, any bar 1200, 1201, 12000, 12001, 65000, 65001, and 54936.
>
> Test before you post.
As someone else pointed out, I meant that as a list of codepages
which support all Unicode codepoints, not a
On 5 Dec 2015 06:10, "D'Arcy J.M. Cain" wrote:
>
> On Fri, 4 Dec 2015 18:28:22 -0500
> Terry Reedy wrote:
> > On 12/4/2015 1:07 PM, D'Arcy J.M. Cain wrote:
> > > I thought that going to Python 3.4 would solve my Unicode issues
> >
> > Within Python
On 12/5/2015 2:44 PM, Random832 wrote:
On 2015-12-05, Terry Reedy wrote:
On 12/4/2015 10:22 PM, Random832 wrote:
Well, any bar 1200, 1201, 12000, 12001, 65000, 65001, and 54936.
Test before you post.
As someone else pointed out, I meant that as a list of codepages
which
On Sat, Dec 5, 2015 at 4:03 PM, Terry Reedy wrote:
> On 12/5/2015 2:44 PM, Random832 wrote:
>> As someone else pointed out, I meant that as a list of codepages
>> which support all Unicode codepoints, not a list of codepoints
>> not supported by Tk's UCS-2. Sorry, I assumed
On 4 Dec 2015 22:34, "D'Arcy J.M. Cain" wrote:
>
> 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
>
I think you need to use a raw unicode string, ur
>>> unicodedata.name(ur'\u2122')
'TRADE MARK SIGN'
> Date: Fri, 4 Dec 2015 13:07:38 -0500
> From: da...@vybenetworks.com
> To: python-list@python.org
> Subject: Unicode failure
>
> I thought that going to Python 3.4 wo
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
D'Arcy J.M. Cain wrote:
> 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}")
>
>
On 12/4/2015 1:07 PM, D'Arcy J.M. Cain wrote:
I thought that going to Python 3.4 would solve my Unicode issues
Within Python itself, that should be mostly true. As soon as you send
text to a display, the rules of the display device take over.
#! /usr/bin/python3
# -*- coding: UTF-8 -*-
On 2015-12-04, Terry Reedy wrote:
> Tk widgets, and hence IDLE windows, will print any character from \u
> to \u without raising, even if the result is blank or �. Higher
> codepoints fail, but allowing the entire BMP is better than any Windows
> codepage.
Well, any
On Fri, 4 Dec 2015 22:49:49 +
Albert-Jan Roskam wrote:
> I think you need to use a raw unicode string, ur
>
> >>> unicodedata.name(ur'\u2122')
> 'TRADE MARK SIGN'
That seems to work in 2.x but not 3.x.
--
D'Arcy J.M. Cain
Vybe Networks Inc.
On 12/4/2015 10:22 PM, Random832 wrote:
On 2015-12-04, Terry Reedy wrote:
Tk widgets, and hence IDLE windows, will print any character from \u
to \u without raising, even if the result is blank or �. Higher
codepoints fail, but allowing the entire BMP is better than
On Fri, 4 Dec 2015 18:28:22 -0500
Terry Reedy wrote:
> On 12/4/2015 1:07 PM, D'Arcy J.M. Cain wrote:
> > I thought that going to Python 3.4 would solve my Unicode issues
>
> Within Python itself, that should be mostly true. As soon as you
> send text to a display, the rules of
On Sat, Dec 5, 2015 at 5:06 PM, Terry Reedy wrote:
> On 12/4/2015 10:22 PM, Random832 wrote:
>>
>> On 2015-12-04, Terry Reedy wrote:
>>>
>>> Tk widgets, and hence IDLE windows, will print any character from \u
>>> to \u without raising, even if the
On 12/4/2015 11:15 PM, D'Arcy J.M. Cain wrote:
On Fri, 4 Dec 2015 22:49:49 +
Albert-Jan Roskam wrote:
I think you need to use a raw unicode string, ur
Nope. The 'r' prefix does not disable unicode escapes.
unicodedata.name(ur'\u2122')
'TRADE MARK SIGN'
If
23 matches
Mail list logo