=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?= <[EMAIL PROTECTED]> wrote:
>Thomas Bellman wrote:
>> Fixed-with characters *do* have advantages, even in the external
>> representation. With fixed-with characters you don't have to
>> parse the entire file or stream in order to read the Nth character;
>
Thomas Bellman wrote:
> Fixed-with characters *do* have advantages, even in the external
> representation. With fixed-with characters you don't have to
> parse the entire file or stream in order to read the Nth character;
> instead you can skip or seek to an octet position that can be
> calculated
John Machin <[EMAIL PROTECTED]> wrote:
> UTF-32 is yet another encoding.
[...]
> Once you have done codecs.open('inputfile', 'rb', 'utf_32') or
> receivedstring.decode('utf_32'), what do you care whether your
> *external representation* has fixed-width characters or not?
> Putting it another way,
On Tue, 10 May 2005 07:59:31 + (UTC), Thomas Bellman
<[EMAIL PROTECTED]> wrote:
>John Machin <[EMAIL PROTECTED]> writes:
>
>> Which raises a question: who or what is going to read your file? If a
>> Unicode-aware application, and never a human, you might like to
>> consider encoding the text a
John Machin <[EMAIL PROTECTED]> writes:
> Which raises a question: who or what is going to read your file? If a
> Unicode-aware application, and never a human, you might like to
> consider encoding the text as utf-16.
Why would one want to use an encoding that is neither semi-compatible
with ASCI
John Machin wrote:
> Terminology disambiguation: what I call "users" wouldn't know what
> 'cp1252' and 'iso-8859-1' were. They're not expected to know. They
> just type in whatever characters they can see on their keyboard or
> find in the charmap utility. It's what I'd call 'admins' and
> 'develop
Max M wrote:
>> (I just noticed that there's no euro sign on my swedish keyboard. I've
>> never missed it ;-)
>
> It's probably "AltGR + E" like here in DK
ah, there it is. almost entirely worn out. and it doesn't work. but a little
fooling around reveals that AltGr+5 does work. oh well, you
On 5/9/05, Max M <[EMAIL PROTECTED]> wrote:
> Fredrik Lundh wrote:
>
> > (I just noticed that there's no euro sign on my swedish keyboard. I've
> > never missed it ;-)
>
> It's probably "AltGR + E" like here in DK
My UK keyboard has it as AltGr + 4, FWIW.
--
Cheers,
Simon B,
[EMAIL PROTECTED]
Fredrik Lundh wrote:
> (I just noticed that there's no euro sign on my swedish keyboard. I've
> never missed it ;-)
It's probably "AltGR + E" like here in DK
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
John Machin wrote:
> I find it a bit hard to imagine that the euro sign wouldn't get a fair
> bit of usage in Swedish data processing even if it's not their own
> currency.
it's spelled "Euro" or "EUR" in swedish.
(if you live in a country that use letters to represent its own currency,
you tend
Le Mon, 09 May 2005 08:39:40 +1000, John Machin a écrit :
> On Sun, 08 May 2005 19:49:42 +0200, "Martin v. Löwis"
><[EMAIL PROTECTED]> wrote:
>
>>John Machin wrote:
>>> Martin, I can't guess the reason for this last suggestion; why should
>>> a Windows system use iso-8859-1 instead of cp1252?
>>
>
On Sun, 08 May 2005 19:49:42 +0200, "Martin v. Löwis"
<[EMAIL PROTECTED]> wrote:
>John Machin wrote:
>> Martin, I can't guess the reason for this last suggestion; why should
>> a Windows system use iso-8859-1 instead of cp1252?
>
>Windows users often think that windows-1252 is the same thing as
>i
John Machin wrote:
> Martin, I can't guess the reason for this last suggestion; why should
> a Windows system use iso-8859-1 instead of cp1252?
Windows users often think that windows-1252 is the same thing as
iso-8859-1, and then exchange data in windows-1252, but declare them
as iso-8859-1 (in pa
On Sun, 08 May 2005 11:23:49 +0200, "Martin v. Löwis"
<[EMAIL PROTECTED]> wrote:
>Svennglenn wrote:
>> # -*- coding: cp1252 -*-
>>
>> titel = "åäö"
>> titel = unicode(titel)
>
>Instead of this, just write
>
># -*- coding: cp1252 -*-
>
>titel = u"åäö"
>
>> fil = open("testfil.txt", "w")
>> fil.wri
Svennglenn wrote:
> # -*- coding: cp1252 -*-
>
> titel = "åäö"
> titel = unicode(titel)
Instead of this, just write
# -*- coding: cp1252 -*-
titel = u"åäö"
> fil = open("testfil.txt", "w")
> fil.write(titel)
> fil.close()
Instead of this, write
import codecs
fil = codecs.open("testfil.txt",
Hi All--
John Machin wrote:
>
>
> The general rule in working with Unicode can be expressed something
> like "work in Unicode all the time i.e. decode legacy text as early as
> possible; encode into legacy text (if absolutely required) as late as
> possible (corollary: if forced to communicate w
On Sat, 7 May 2005 17:25:28 -0500, Skip Montanaro <[EMAIL PROTECTED]>
wrote:
>
>Svennglenn> Traceback (most recent call last):
>Svennglenn> File "D:\Documents and
>Svennglenn>
> Settings\Daniel\Desktop\Programmering\aaotest\aaotest2\aaotest2.pyw",
>Svennglenn> line 5, in ?
>
On 7 May 2005 14:22:56 -0700, "Svennglenn" <[EMAIL PROTECTED]>
wrote:
>I'm working on a program that is supposed to save
>different information to text files.
>
>Because the program is in swedish i have to use
>unicode text for ÅÄÖ letters.
"program is in Swedish": to the extent that this means "
Svennglenn> Traceback (most recent call last):
Svennglenn> File "D:\Documents and
Svennglenn>
Settings\Daniel\Desktop\Programmering\aaotest\aaotest2\aaotest2.pyw",
Svennglenn> line 5, in ?
Svennglenn> titel = unicode(titel)
Svennglenn> UnicodeDecodeError: 'ascii' cod
I'm working on a program that is supposed to save
different information to text files.
Because the program is in swedish i have to use
unicode text for ÅÄÖ letters.
When I run the following testscript I get an error message.
# -*- coding: cp1252 -*-
titel = "åäö"
titel = unicode(titel)
print "
20 matches
Mail list logo