* Mark Tolonen:
"Terry Reedy" wrote in message
news:hnjkuo$n1...@dough.gmane.org...
On 3/14/2010 4:40 PM, Guillermo wrote:
Adding the byte that some call a 'utf-8 bom' makes the file an invalid
utf-8 file.
Not true. From http://unicode.org/faq/utf_bom.html:
Q: When a BOM is used, is it o
"Terry Reedy" wrote in message
news:hnjkuo$n1...@dough.gmane.org...
On 3/14/2010 4:40 PM, Guillermo wrote:
Adding the byte that some call a 'utf-8 bom' makes the file an invalid
utf-8 file.
Not true. From http://unicode.org/faq/utf_bom.html:
Q: When a BOM is used, is it only in 16-bit Uni
> 2) My script gets output from a Popen call (to execute a Powershell
> script [new Windows shell language] from Python; it does make sense!).
> I suppose changing the Windows codepage for a single Popen call isn't
> straightforward/possible?
Nevermind. I'm able to change Windows' codepage to 6500
Guillermo:
> 2) My script gets output from a Popen call (to execute a Powershell
> script [new Windows shell language] from Python; it does make sense!).
> I suppose changing the Windows codepage for a single Popen call isn't
> straightforward/possible?
You could try SetConsoleOutputCP and Set
> The console is commonly using Code Page 437 which is most compatible
> with old DOS programs since it can display line drawing characters. You
> can change the code page to UTF-8 with
> chcp 65001
That's another issue in my actual script. A twofold problem, actually:
1) For me chcp gives 850
Guillermo:
> Is this an enforced convention under Windows, then? My head's aching
> after so much pulling at my hair, but I have the feeling that the
> problem only arises when text travels through the dos console...
The console is commonly using Code Page 437 which is most compatible
with old
On 3/14/2010 4:40 PM, Guillermo wrote:
Hi,
I would appreciate if someone could point out what am I doing wrong
here.
Basically, I need to save a string containing non-ascii characters to
a file encoded in utf-8.
If I stay in python, everything seems to work fine, but the moment I
try to read t
On 14 mar, 22:22, Guillermo wrote:
> > That is what happens: the file now starts with a BOM \xEB\xBB\xBF as
> > you can see with a hex editor.
>
> Is this an enforced convention under Windows, then? My head's aching
> after so much pulling at my hair, but I have the feeling that the
> problem o
> That is what happens: the file now starts with a BOM \xEB\xBB\xBF as
> you can see with a hex editor.
Is this an enforced convention under Windows, then? My head's aching
after so much pulling at my hair, but I have the feeling that the
problem only arises when text travels through the dos co
Guillermo:
> I then open the file m.txt with notepad, and I see "mañana" normally.
> I save (again, no actual modifications), go back to the dos prompt, do
> type m.txt and this time it works! I get "mañana". When notepad opens
> the file, the encoding is already UTF-8, so short of a UTF-8 bom bei
10 matches
Mail list logo