Author Topic: File encoding defaults for load AND save  (Read 1260 times)

Offline Stefan

  • Administrator
  • Hero Member
  • *****
  • Posts: 775
  • Karma: +6/-0
File encoding defaults for load AND save
« on: June 05, 2009, 06:04:43 PM »
File encoding  defaults for load AND save


 I have an DOS 850 encoding batch.cmd

If i load them i'd like to auto change encoding to Windows 1250 to see  850-encoded umlauts correct.


For saving i'd like auto save as code 850 again to have umlauts in 850-encoding again.

Maybe like:
<Encoding default="1250" force="true" save="850"/>

Question: is this somehow possible to set this two encoding?  Right now i see force-load-encoding "only".
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2212
  • Karma: +37/-3
    • HippoEDIT
Re: File encoding defaults for load AND save
« Reply #1 on: June 06, 2009, 03:38:54 PM »
Hello Stefan,

I think you are not doing things correctly... or I have not understand you.

The document can have only ONE code page, in which it contents visible correctly.
To see umlauts stored in 850 code page you need to use 850 code page, if they can be only visible with 1250 code page, so this mean the document was stored in 1250 code page.

As I wrote in another post, HE works in UTF16 (which is also code page 1200) and uses code page shown in status for load and save of the document. If you would use different code pages for reading and saving you would lose information. If one of code pages is not Unicode (does not contain complete character set). If both code pages are Unicode (UTF8, UTF7, UTF-16 LE, UTF-16 BE, UTF32 ) information would not be lost.
In your case both code pages are ANSII (non-unicode) so you can lose the information.

Best regards,
Alex.