From python to LaTeX in emacs on windows

From: Brian Elmegaard (brian_at_rk-speed-rugby.dk)
Date: 08/30/04


Date: 30 Aug 2004 13:32:03 +0200

Hi group

I hope this is not a faq...

I try to understand how to use the new way of specifying a files
encoding, but no matter what I do I get strange characters in the
output.

I have a text file which I have generated in python by parsing some
html.

In the file there is international characters like é and ó.
I can see the file in emacs it is encoded as
mule-utf-8-dos

I read the file into python as a string and suddenly the characters
when printed looks strange and consists of two characters.

First problem: How do I avoid this?

Second problem is that I make some string replacements and more in
the string to write a latex output file. When I open this file in
emacs the characters now are not the same?

Second problem: How do I avoid this?

tia,

-- 
Brian (remove the sport for mail)
http://www.et.dtu.dk/staff/be


Relevant Pages

  • Re: From python to LaTeX in emacs on windows
    ... > In the file there is international characters like é and ó. ... > I read the file into python as a string and suddenly the characters ... > Second problem: ... convert the unicode string back to a byte sequence. ...
    (comp.lang.python)
  • Re: [Q] How to eval an EXPR once and make it stick
    ... > Does the entire string, from start to end, consist of zero or more 'space' ... but I like to avoid possible boundary conditions that make me think ... Do you Yahoo!? ...
    (perl.beginners)
  • Re: Base64 question
    ... I convert the bytes to Base64. ... However, the result includes characters that are invalid for a URL, ... I have to cycle the output string through ... Base64 converter to use a character set that could avoid the trip through ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: safe scanf( ) or gets
    ... specify the maximum number of characters to read into your buffer. ... You can avoid this problem by specifying the maximum field width in the ... > a string with this single character, then appending this character to the ...
    (comp.lang.c)
  • Re: read from a Windows application
    ... Because he's dealing with bytes, not characters. ... So he should avoid ... String completely. ...
    (comp.lang.java.help)