ILEditor icon indicating copy to clipboard operation
ILEditor copied to clipboard

Program Encoding Setting

Open lollo0296 opened this issue 5 years ago • 4 comments

Hi Barry,

I've been enjoying your ILEditor at my workplace for months now.

I have just one major complaint about it: I work in Germany and the old code of my company is packed with characters like [ 'ä', 'ö', 'ü', 'ß', '§' ]. ILEditor can't display these characters correctly and the code looks like a mess.

Take a look at this before / after screenshot: rpgle_before-after

Changes:

  • Configuration node encoding added
  • 2 labels and 1 ComboBox added to Component: Forms/Connection in tab: ILEditor
  • If no encoding is set from User, this is set to standard ISO-8859-1 in method DoEditorsDefaults()
  • Program sets its property Encoding at start on Main() function
// Set Program Encoding
int encodingId = Convert.ToInt32(Config.GetValue("encoding"));
Encoding = Encoding.GetEncoding(encodingId);

It would be awesome if you merge my code in and make a new ILEditor release 😆

lollo0296 avatar Sep 11 '20 09:09 lollo0296

Wow, this is a super change.

Of course... there hasn't been a release to ILEditor in quite sometime but as this is quite important I'll take a look into getting it in over the weekend for you.

worksofliam avatar Sep 11 '20 15:09 worksofliam

@lollo0296 What is 28591 by default? Is that ISO-8859-1?

worksofliam avatar Sep 11 '20 15:09 worksofliam

@worksofliam Yes, it is ISO-8859-1. Same default setting you already had there. Please refer to the Microsoft docs for a full list of encoding IDs.

https://docs.microsoft.com/dotnet/api/system.text.encoding?view=netcore-3.1#list-of-encodings

And thank you man

lollo0296 avatar Sep 12 '20 17:09 lollo0296

@worksofliam anything new about it ❓

lollo0296 avatar Sep 15 '20 15:09 lollo0296