If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
BTW, in case it wasn't obvious, you can disable the auto-detection permanently in the C++ file format. Notepad++ and MSVC don't do auto-detection, so you really wouldn't lose anything.
The encoding autodetection is a heuristic, so it just gives weights and then decides on the best fit. I'd love to be able to give more weight to the current system encoding, but we're using an API provided by Internet Explorer and it doesn't give that sort of control.
I had a weird bug today : I've edited a regular C++ file, in ANSI.
When i compared that file with the previous version (i'm using svn), the old file was in ANSI but the recent one was seen as Baltic (Windows)... As a result, some chars are different (there are some comments in french with accents on "e" or on "a" that are replaced with baltic chars...).
When i open the file with any other editor (notepad++ or MS Visual C++ 2003), there is no problem...
I even tried to undo the modifications and to do them back from scratch but the result is the same : the file is seen as baltic... Weird ! Isn't it ?
And my modifications are really basic : i'm only adding spaces (correcting a few tabulations to make the code look clean )
I've modified some other files the same day, the same way, but there is only this one file that bothers me...
Has anybody seen anything like that already ?
I know I just have to manually select ANSI in the editor to fix the problem, but the automatic detection of the file format seems to be a bit buggy...
Leave a comment: