Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > unicode support

Reply
Thread Tools

unicode support

 
 
xah@xahlee.org
Guest
Posts: n/a
 
      01-09-2005
# -*- 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 function with unicode char.

---------

In perl, support of unicode is very flaky. The language does not
support it, but packages that changes behaviors of string handling (in
its regex, for instance.)
Xah
http://www.velocityreviews.com/forums/(E-Mail Removed)
http://xahlee.org/PageTwo_dir/more.html

 
Reply With Quote
 
 
 
 
Jrgen Exner
Guest
Posts: n/a
 
      01-09-2005
(E-Mail Removed) 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
> its regex, for instance.)


Really? You may want to check your sources. They seem to be a little bit
outdated, like several years old?

jue


 
Reply With Quote
 
 
 
 
Matt Garrish
Guest
Posts: n/a
 
      01-09-2005

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
# -*- 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 function with unicode char.

So why are you posting to a Perl newsgroup? You can "use utf8" if you want
to write your Perl programs in utf-8 (though you should upgrade to 5.8 as
well). Or is this your lame attempt at trolling at python group?

Matt


 
Reply With Quote
 
Charlton Wilbur
Guest
Posts: n/a
 
      01-09-2005
>>>>> "xah" == xah <(E-Mail Removed)> 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 trolling. (Whether he's *only* a troll, or a reasonable
person who occasionally trolls to amuse himself, is a matter of
perspective.) Please note the inaccuracy of his comment on Perl and
the two newsgroups to which this message was posted before replying;
this is a clear case of "lets you and him fight."

Charlton


--
cwilbur at chromatico dot net
cwilbur at mac dot com
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: os.lisdir, gets unicode, returns unicode... USUALLY?!?!? Jean-Paul Calderone Python 23 11-21-2006 10:25 AM
os.lisdir, gets unicode, returns unicode... USUALLY?!?!? gabor Python 13 11-18-2006 09:23 AM
Unicode digit to unicode string Gabriele *darkbard* Farina Python 2 05-16-2006 01:15 PM
unicode wrap unicode object? ygao Python 6 04-08-2006 09:54 AM
Unicode + jsp + mysql + tomcat = unicode still not displaying Robert Mark Bram Java 0 09-28-2003 05:37 AM



Advertisments