"Serge Orlov" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
> Paul Boddie wrote:
> > Anyone who has needed to expose filesystems
> > created by Linux distributions before the UTF-8 "big push" to later
> > distributions can attest to the fact that the "see no evil" brass
> > monke
Fuzzyman wrote:
ust = 'æøå'.decode('utf-8')
Which is now deprecated isn't it ? (including encoded string literals
in source without declaring an encoiding).
Not having an encoding declaration while having non-ASCII characters
in source code is deprecated.
Having non-ASCII characters in string liter
Paul Boddie wrote:
> One side-effect of the "big push" to UTF-8 amongst the Linux
> distribution vendors/maintainers is the evasion of issues such as
> filesystem encodings and "real" Unicode at the system level. In
> Python, when you have a Unicode object, you are dealing with
> idealised
> sequen
Mike Dee <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
> A very very basic UTF-8 question that's driving me nuts:
>
> If I have this in the beginning of my Python script in Linux:
>
> #!/usr/bin/env python
> # -*- coding: UTF-8 -*-
>
> should I - or should I not - be able to u
Max M wrote:
> Fuzzyman wrote:
> > Mike Dee wrote:
>
> >>#!/usr/bin/env python
> >># -*- coding: UTF-8 -*-
>
> > This will mean string literals in your source code will be encoded
as
> > UTF8 - if you handle them with normal string operations you might
get
> > funny results.
>
> It means that you
Max M wrote:
> And this string will automatically be utf-8 encoded:
>
> st = 'æøå'
>
> So you should be able to convert it to unicode without giving an
> encoding:
>
> ust = unicode(st)
>
No.
Strings have no knowledge of their encoding. As you describe the string
will be utf-8 encoded, but
Fuzzyman wrote:
Mike Dee wrote:
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
This will mean string literals in your source code will be encoded as
UTF8 - if you handle them with normal string operations you might get
funny results.
It means that you don't have to explicitely set the encoding on
Mike Dee wrote:
> A very very basic UTF-8 question that's driving me nuts:
>
> If I have this in the beginning of my Python script in Linux:
>
> #!/usr/bin/env python
> # -*- coding: UTF-8 -*-
>
> should I - or should I not - be able to use non-ASCII characters
> in strings and in Tk GUI button la
Hace mucho tiempo en una galaxia muy, muy lejana, Mike Dee escribió:
A very very basic UTF-8 question that's driving me nuts:
If I have this in the beginning of my Python script in Linux:
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
should I - or should I not - be able to use non-ASCII characte
Mike Dee wrote:
> [snip wrestling with byte strings]
In addition to Martin reply I just want to add two notes:
1. Interactive console in python 2.3 has a bug that was fixed
in 2.4, so you can't enter unicode strings at the prompt:
C:\Python24>python.exe
>>> a=u'ÐÐÐ'
>>> a
u'\u0430\u0431\u0432'
C
Hi !
For test your system, please, read this url :
http://sivanataraja.free.fr/config/test.htm (french)
http://www.alanwood.net/unicode/ (english)
And many explains : http://en.wikipedia.org/wiki/Unicode
And, to reassure you: I had no problème for use unicode chars with Tk (my
tests
Mike Dee wrote:
If I have this in the beginning of my Python script in Linux:
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
should I - or should I not - be able to use non-ASCII characters
in strings and in Tk GUI button labels and GUI window titles and in
raw_input data without Python returning
A very very basic UTF-8 question that's driving me nuts:
If I have this in the beginning of my Python script in Linux:
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
should I - or should I not - be able to use non-ASCII characters
in strings and in Tk GUI button labels and GUI window titles
13 matches
Mail list logo