xsharp.eu • XsFrm designer generates code files with ansi encoding
Page 1 of 1

XsFrm designer generates code files with ansi encoding

Posted: Mon Oct 25, 2021 1:23 pm
by VR
The prg file, that is generated by the XsFrm designer in Visual Studio is saved using ansi encoding (the system default one which in my case is Win1252). Is there a reason, why this is done?

I would prefer, that the code files whould be created in UTF-8. Can this be changed?

XsFrm designer generates code files with ansi encoding

Posted: Mon Oct 25, 2021 5:15 pm
by Chris
Hi Volkmar,

You can choose the encoding by selecting Save As in the prg file, then click on the small arrow next to the Save button and select "Save with Encoding" and choose your selected. From then on, this setting should be used. I just tried it and it seems to be working, but please let us know if you see something wrong with it.

.

XsFrm designer generates code files with ansi encoding

Posted: Tue Oct 26, 2021 10:33 am
by VR
Hi Chris

I tested it and it looks like, that the designer doesn't change the file encoding. So once I changed the encoding from Ansi to UTF8, it stays UTF8.

So my idea was to set the charset using the .editorconfig, but it seems, that this has no effect on the generated prg files... This is the setting in the .editorconfig file:

[*.prg]
charset = utf-8-bom

XsFrm designer generates code files with ansi encoding

Posted: Tue Oct 26, 2021 10:37 am
by robert
Volkmar,

Did you create a new form or was this form imported from VO ?
I think we can make sure that the templates will have UTF-8 encoding.

Robert

XsFrm designer generates code files with ansi encoding

Posted: Tue Oct 26, 2021 12:32 pm
by VR
Robert,

it was a form imported from VO.

XsFrm designer generates code files with ansi encoding

Posted: Tue Oct 26, 2021 1:22 pm
by robert
Volkmar,

We will change the VOXporter to write Encoding.UTF8 instead of Encoding.Default

Robert