Summary: | Implement a encoding detection | ||
---|---|---|---|
Product: | [Applications] kate | Reporter: | de-chalendarg |
Component: | part | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Mandrake RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
de-chalendarg
2003-09-12 14:18:01 UTC
1. we write to the file with disabled unicode header I think 2. that is the current default behaviour, save the file in the encoding it was opened with (both points means current state of kde cvs head) could somebody retest that, not that the problem is still there, want to have that really fixed for 3.2 if there is still some issue in cvs Subject: Re: kate should by default use the encoding of the current document to save it OK. I will try to install 3.2 CVS at home the more quickly I can. Thanks. Ga Tried with KDE3.2 alpha1 (built with konstruct). The problem is still there. Here my test procedure: - write a file in iso-latin-1 (test.txt) - convert it to UTF-16: recode latin1..utf16 test.txt - look at it : UTF-16 - open the file with kate - make a modification - save it - look at it: latin-1 Will try with CVS if nobody else does it ; But I'd like not to have to do that. I'd love to use kate inside of jedit for my UTF-16 files. Thanks Ga ? how should kate know that it is utf16 do you tell kate that in the filedialog or do you have set utf16 as default encoding ? I tried with the KDE CVS of 09/27 and the problem is still there, reproducible by the manipulation described above. I tried to look at the code, but with no hint, I was not able to find exactly where to look at.... Where is the content of the file first accessed ? That could enable to add a check of the byte order marker and eventually call the QT method that checks if an encoding is valid for a stream (don't remember its name right now). Ga the problem is that the user not always want that, would need some message box which asks the user if he really wants the detected stuff, the place to add that is in katebuffer::openFile () or katedocument::openFile add this to the wishs |