Re: Unicode support in Python 2.7.8 - 16 bit

2017-03-07 Thread Steven D'Aprano
On Tue, 07 Mar 2017 14:05:15 -0800, John Nagle wrote: > How do I test if a Python 2.7.8 build was built for 32-bit Unicode? sys.maxunicode will be 1114111 if it is a "wide" (32-bit) build and 65535 if it is a "narrow" (16-bit) build. You can double-check with: unichr(0x10) # will raise V

Re: Unicode support in Python 2.7.8 - 16 bit

2017-03-07 Thread Terry Reedy
On 3/7/2017 5:05 PM, John Nagle wrote: How do I test if a Python 2.7.8 build was built for 32-bit Unicode? (I'm dealing with shared hosting, and I'm stuck with their provided versions.) If I give this to Python 2.7.x: sy = u'\U0001f60f' len(sy) is 1 on a Ubuntu 14.04LTS machine, but 2

Re: Unicode support in Python 2.7.8 - 16 bit

2017-03-07 Thread Chris Angelico
On Wed, Mar 8, 2017 at 9:05 AM, John Nagle wrote: >How do I test if a Python 2.7.8 build was built for 32-bit > Unicode? (I'm dealing with shared hosting, and I'm stuck > with their provided versions.) > > If I give this to Python 2.7.x: > > sy = u'\U0001f60f' > > len(sy) is 1 on a Ubuntu

Re: Unicode Support in Ruby, Perl, Python, Emacs Lisp

2010-10-10 Thread Steven D'Aprano
On Sun, 10 Oct 2010 11:34:02 +0200, David Kastrup wrote: [unnecessary quoting removed] > Your headers state: > > User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (darwin) Please stop spamming multiple newsgroups. I'm sure this is of great interest to the Emacs newsgroup, but not of Python. Followu

Re: Unicode Support in Ruby, Perl, Python, Emacs Lisp

2010-10-10 Thread Nobody
On Sat, 09 Oct 2010 15:45:42 -0700, Sean McAfee wrote: >> I'll have to say, as far as text processing goes, the most beautiful >> lang with respect to unicode is emacs lisp. In elisp code (e.g. >> Generate a Web Links Report with Emacs Lisp ), i don't have to declare >> none of the unicode or enco

Re: Unicode Support in Ruby, Perl, Python, Emacs Lisp

2010-10-10 Thread David Kastrup
Sean McAfee writes: > Xah Lee writes: >> Perl's exceedingly lousy unicode support hack is well known. In fact >> it is the primary reason i “switched” to python for my scripting needs >> in 2005. (See: Unicode in Perl and Python) > > I think your assessment is antiquated. I've been doing Unicod

Re: Unicode Support in Ruby, Perl, Python, Emacs Lisp

2010-10-09 Thread Steven D'Aprano
On Sat, 09 Oct 2010 13:06:32 -0700, Bigos wrote: [...] > Maybe you have checked wrong version. There two versions of Ruby out > there one does support unicode and the other doesn't. Please don't feed the trolls. Xah Lee is a known troll who cross-posts to irrelevant newsgroups with his blathering

Re: Unicode Support in Ruby, Perl, Python, Emacs Lisp

2010-10-09 Thread Xah Lee
2010-10-09 On Oct 9, 3:45 pm, Sean McAfee wrote: > Xah Lee writes: > > Perl's exceedingly lousy unicode support hack is well known. In fact > > it is the primary reason i “switched” to python for my scripting needs > > in 2005. (See: Unicode in Perl and Python) > > I think your assessment is ant

Re: Unicode Support in Ruby, Perl, Python, Emacs Lisp

2010-10-09 Thread Sean McAfee
Xah Lee writes: > Perl's exceedingly lousy unicode support hack is well known. In fact > it is the primary reason i “switched” to python for my scripting needs > in 2005. (See: Unicode in Perl and Python) I think your assessment is antiquated. I've been doing Unicode programming with Perl for ab

Re: Unicode Support in Ruby, Perl, Python, Emacs Lisp

2010-10-09 Thread Bigos
On Oct 7, 7:13 pm, Xah Lee wrote: > here's my experiences dealing with unicode in various langs. > > Unicode Support in Ruby, Perl, Python, Emacs Lisp > > Xah Lee, 2010-10-07 > > I looked at Ruby 2 years ago. One problem i found is that it does not > support Unicode well. I just checked today, it

Re: Unicode support in python

2006-10-25 Thread sonald
HI Can u please tell me if there is any package or class that I can import for internationalization, or unicode support? This module is just a small part of our application, and we are not really supposed to alter the code. We do not have nobody here to help us with python here. and are supposed t

Re: Unicode support in python

2006-10-25 Thread sonald
Fredrik Lundh wrote: > > what does the word "validate" mean here? > Let me explain our module. We receive text files (with comma separated values, as per some predefined format) from a third party. for example account file comes as "abc.acc" {.acc is the extension for account file as per our code}

Re: Unicode support in python

2006-10-20 Thread John Roth
sonald wrote: > Hi, > I am using python2.4.1 > > I need to pass russian text into python and validate the same. > Can u plz guide me on how to make my existing code support the > russian text. > > Is there any module that can be used for unicode support in python? > > Incase of decimal numbers, h

Re: Unicode support in python

2006-10-20 Thread Fredrik Lundh
"sonald" wrote: > I have added the following line in the script > > # -*- coding: utf-8 -*- that's good. > I have also modified the site.py that's bad, because this means that your code won't work on standard Python installations. > Now when I try to validate the data in the text file > say ab

Re: Unicode support in python

2006-10-20 Thread Diez B. Roggisch
sonald schrieb: > Fredrik Lundh wrote: >>>http://www.google.com/search?q=python+unicode >> (and before anyone starts screaming about how they hate RTFM replies, look >> at the search result) >> >> > Thanks!! but i have already tried this... Tried - might be. But you certainly didn't understan

Re: Unicode support in python

2006-10-20 Thread sonald
Fredrik Lundh wrote: > >http://www.google.com/search?q=python+unicode > > (and before anyone starts screaming about how they hate RTFM replies, look > at the search result) > > Thanks!! but i have already tried this... and let me tell you what i am trying now... I have added the following li

Re: Unicode support in python

2006-10-20 Thread Fredrik Lundh
>http://www.google.com/search?q=python+unicode (and before anyone starts screaming about how they hate RTFM replies, look at the search result) -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode support in python

2006-10-20 Thread Fredrik Lundh
"sonald" wrote: > I need to pass russian text into python and validate the same. > Can u plz guide me on how to make my existing code support the > russian text. > > Is there any module that can be used for unicode support in python? Python has built-in Unicode support (which you would probably

Re: unicode support

2005-01-09 Thread Charlton Wilbur
> "xah" == xah <[EMAIL PROTECTED]> writes: xah> python supports unicode in source xah> code by putting a coding declaration as the first line. [...] xah> In perl, support of unicode is very flaky. The language does xah> not support it, [...] All: Xah Lee is trolli

Re: unicode support

2005-01-09 Thread Matt Garrish
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] # -*- coding: utf-8 -*- # python supports unicode in source code by putting a coding declaration # as the first line. print "look chinese chars: ?" # Note, however, identifiers cannot use unicode chars. # e.g. you cannot define a fu

Re: unicode support

2005-01-09 Thread Jürgen Exner
[EMAIL PROTECTED] wrote: > # -*- coding: utf-8 -*- > # python supports unicode in source code by putting a coding > declaration > # as the first line. So? > In perl, support of unicode is very flaky. The language does not > support it, but packages that changes behaviors of string handling (in >