Re: [cssed-devel] Problems with encoding changes
Brought to you by:
iagorubio
From: Iago R. <iag...@hi...> - 2004-09-24 16:48:07
|
On Fri, 2004-09-24 at 10:14, Mich=C3=A8le Garoche wrote: > Say I write down a file with no special encoding. ok. > I put Mich=C3=A8le in it: (e grave on the first e). > Then I save the file. >=20 > Then I change the encoding to utf8, with Document->Encoding,=20 Nope, you forze the buffer to be treated as UTF-8, it does not change the encoding, nor convert between encodings. All text in the buffer will be in the file's encoding, and all new text in the selected encoding. > it leads=20 > to the loss of all characters after Mich (on the display at least). > That's annoying. I know that :) It handles the encodings well, but you - right now - can not convert between different encodings in cssed. It'll recognize the encoding of opened files and set as UTF-8 the new ones, but can not convert. As example, try `file` on your file with "Mich=C3=A8lle", imagine you named it "test". It will say you something like: $file test test: ISO-8859 text, with no line terminators Open it in cssed, add more text and save it.=20 Then try `file`again, it will be still ISO-8859. Now convert it to UTF-8 with: $iconv -f ISO-8859-1 -t UTF-8 test > test.utf8 $file test.utf8 test.utf8: UTF-8 Unicode text, with no line terminators Open test.utf8 in cssed, add more text and save it. It will recognice it as UTF-8, the encoding will be set automatically and the text will be saved as UTF-8 (try file again if you want to check if it's true). So the encoding is treated trasparently, but can not convert between encodings yet. So ... what the hell is needed the anoying "Encoding" stuff ? It's needed because cssed will treat all documents as UTF-8. If you need to write a document to anyone that can not read UTF-8, you can forze the encoding - before to write any text - and save in you preferred encoding. I think that will be better to rename it as "Forze encoding" or something like that. --=20 Iago Rubio =20 - Home page * http://www.iagorubio.com=20 - Last project * http://cssed.sourceforge.net =20 - GPG Keyserv * pgp.rediris.es id=3D0x909BD4DD |