Re: EOL created by .write or .encode

2005-04-10 Thread Alan Mackenzie
In comp.emacs.xemacs Xah Lee <[EMAIL PROTECTED]> wrote: > I found the problem now. (after some one hour debug time) Python > didn't have problem. Emacs does. > If you open a file in emacs, it will open fine regardless whether the > EOL is ascii 10 or 13. (unix or mac) This is a nice feature. Howe

Re: EOL created by .write or .encode

2005-04-10 Thread Xah Lee
can any GNU person or emacs coder answer this? specifically: why does what-cursor-position give incorrect answer. Xah [EMAIL PROTECTED] â http://xahlee.org/PageTwo_dir/more.html â Xah Lee wrote: > I found the problem now. (after some one hour debug time) Python > didn't have problem. Emacs do

Re: EOL created by .write or .encode

2005-04-09 Thread Aidan Kehoe
Ar an naoià là de mà AibrÃan, scrÃobh Xah Lee: > If you open a file in emacs, it will open fine regardless whether the > EOL is ascii 10 or 13. (unix or mac) This is a nice feature. However, > the what-cursor-position which is used to show cursor position and the > char's ascii code, says t

Re: EOL created by .write or .encode

2005-04-09 Thread Xah Lee
I found the problem now. (after some one hour debug time) Python didn't have problem. Emacs does. If you open a file in emacs, it will open fine regardless whether the EOL is ascii 10 or 13. (unix or mac) This is a nice feature. However, the what-cursor-position which is used to show cursor posit

Re: EOL created by .write or .encode

2005-04-09 Thread Fredrik Lundh
"Xah Lee" <[EMAIL PROTECTED]> wrote: > Why is that some of my files written out by >outF.write(outtext.encode('utf-8')) > has ascii 10 as EOL, while others has ascii 13 as EOL? >outF = open(tempName,'wb') >outF.write(outtext.encode('utf-8')) >outF.close() UTF-8 is not a binary fo

EOL created by .write or .encode

2005-04-04 Thread Xah Lee
Why is that some of my files written out by outF.write(outtext.encode('utf-8')) has ascii 10 as EOL, while others has ascii 13 as EOL? both of these files's EOL are originally all ascii 10. If i remove the EOL after the tt below in the place string, then this doesn't happen. findreplace = [ (u