Re: [cssed-devel] Problems with encoding changes
Brought to you by:
iagorubio
From: <mic...@ea...> - 2004-09-24 17:04:42
|
Le 24 sept. 2004, =E0 18:47, Iago Rubio a =E9crit : > On Fri, 2004-09-24 at 10:14, Mich=E8le Garoche wrote: >> Say I write down a file with no special encoding. > > ok. > >> I put Mich=E8le in it: (e grave on the first e). >> Then I save the file. >> >> Then I change the encoding to utf8, with Document->Encoding, > > 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 >> 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=E8lle", 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. > > 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=20= > 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 ? No, I find it perfect. That's not annoying at all. Just people should=20 know how it works. > > It's needed because cssed will treat all documents as UTF-8. If you=20 > need > to write a document to anyone that can not read UTF-8, you can forze=20= > 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. Maybe, but better force encoding :-) Mich=E8le <http://micmacfr.homeunix.org> |