Author Topic: Encoding...  (Read 2910 times)

Max

  • Guest
Encoding...
« on: October 29, 2007, 04:53:19 pm »
Dear all,

I have updated my nigthly to the latest 4564 from 4530 (windows XP). In the past I always used the ISO-8859-1 encoding (the default in Settings->editor->default encoding) in all my projects.

Now all my files are reported as Windows-1252 (that is not the same). Ok it's a minor issue but I think is related to

4563 / biplab 2 days * Cleaned up conversion routine to take advantage of latest FileManager code.
                            * Added: Support to use user-specified encoding if auto detection & conversion fails.


Reinstalling the 4530 the encoding seems correctly reported.
« Last Edit: October 29, 2007, 04:57:10 pm by MaxGaspa »

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Encoding...
« Reply #1 on: October 29, 2007, 05:21:03 pm »
I have updated my nigthly to the latest 4564 from 4530 (windows XP). In the past I always used the ISO-8859-1 encoding (the default in Settings->editor->default encoding) in all my projects.

Now all my files are reported as Windows-1252 (that is not the same). Ok it's a minor issue but I think is related to

4563 / biplab 2 days * Cleaned up conversion routine to take advantage of latest FileManager code.
                            * Added: Support to use user-specified encoding if auto detection & conversion fails.


Reinstalling the 4530 the encoding seems correctly reported.

That has been added to encoding conversion fallback code. The code works as follows.
1) When a file is opened EncodingDetector tries to detect encoding (UTF-8/16/32).
2) If EncodingDetector fails to detect UTF-* encoding, it sets the encoding to System default (on Windows it's Windows-1252).
3) It then passes the information to conversion routine. If conversion routine fails, it tries to use User-specified encoding as a last resort.

In your case step 3 works with System-default encoding. Thus your specified encoding is never used.

But I think I should set the step 2 to use the user-specified encoding. :)
Be a part of the solution, not a part of the problem.