Bug #163

Trouble with codepages

Added by Wil van Antwerpen almost 5 years ago. Updated over 4 years ago.

Start date:
Due date:
% Done:



Raveen reported that he has some trouble with editing code where he uses the OEM drawing characters to draw a screen.

Hi Wil,

I’m trying to set the new Hammer (RC1) to use code page 437 (OEM-US,CP437)

Procedure onPaged
Send EditorMessage SCI_SETCODEPAGE 437


But I can seem to do so – is it even possible ?
I reason for this is, I can some DF3 source files I would like to edit which requires the code page to be set to 437

menuxxx-intendedLooks.png View - menu screenshot on how it should look like (39.2 KB) Wil van Antwerpen, 09/06/2019 12:53 PM

menuxxx.src.txt View - the source code of the screenshot (1.92 KB) Wil van Antwerpen, 09/06/2019 12:55 PM


#1 Updated by Wil van Antwerpen almost 5 years ago

This can be fixed as follows:

In cSciLexer.pkg change the default value of property pbAnsiMode to false:

Property Boolean pbAnsiMode                        False   // If true translate text to ANSI on open and back to OEM on save

And add the line:

        If (iCharSet<=0) Move SC_CHARSET_OEM to iCharSet

In procedure SetAdjustments in cEditorEdit.pkg and it works.

We will have to come up with a GUI setting for that as it is really missing.

#2 Updated by Wil van Antwerpen over 4 years ago

  • Status changed from New to Resolved

This is fixed in The Hammer 3, RC2 by adding an extra configuration option to the configuration screen.
File -> Hammer Options -> Editor -> Window

checkbox : OEM To ANSI translation

Uncheck it and then restart The Hammer.

Also available in: Atom PDF