Document encoding -- Kile versus WinEdt

Hi:

I am migrating (many) .tex files created in WinEdt under Windows XP to Kile under openSUSE. Kile uses by default UTF-8 encoding, whereas my files are apparently ANSI… I infer this last from my failed attempt to manipulate WinEdt into encoding in UTF-8 for me, as follows: I had inserted the comment

% !Mode:: “TeX:UTF-8”

into my .tex file (following Re: UTF-8). When I had WinEdt open this file it objected in no uncertain terms: ``The file is not in UTF-8 format: Loading as ANSI.’’

Summarizing, WinEdt provides me files encoded as ANSI. Yet in Kile → Settings → Configure Kile → Open/Save there is no option to select ANSI.

Kile will open these files in read only mode, and I can then save them with a new name, and proceed – but it would be more satisfying to know the ``proper’’ approach to this. Thanks for any tips. jdw

Have you tried importing them into Kate with Autodetect encoding and then saving them out as utf-8?

Thanks for the tip. I tried this, but it didn’t help. In Settings → Configure Kile → Open/Save I tried setting Encoding Autodetection to Universal and to Western European. However when I opened a file (off the Windows machine, prepared in WinEdt) I still got the message that there was a problem, and the file was read only (“The file /home/johnd/jdwtex/closures/Kclosures.tex was opened with UTF-8 encoding but contained invalid characters. It is set to read-only mode…”).

What seems bizarre is that when I go back to look at the settings after doing this process, I find the Encoding Autodetection setting has been changed, to “Thai.” This is repeatable.

Is your Windows partition set to read/write??

These .tex files are coming off a different machine (an old Dell Pentium 4 running Windows XP Home).

It may not work but you could try installing LyX and opening them in Lyx; LyX certainly has a CP 1252 (ANSI) option for encoding but I am not sure how successful it will be in importing the files or whether it will then be possible to change the coding.

If it works, LyX certainly has a Save as function which would allow you to save a Read only file and carry on working on it.

On Wed, 05 May 2010 17:16:02 GMT, j1d1w1
<j1d1w1@no-mx.forums.opensuse.org> wrote:

>
>These .tex files are coming off a different machine (an old Dell Pentium
>4 running Windows XP Home).

You said that they are .tex files instead of .txt files, have you tried
preprocessing them with dos2unix anyway?