XsFrm designer generates code files with ansi encoding

This forum is meant for questions and discussions about the X# language and tools
Post Reply
VR
Posts: 98
Joined: Sun Aug 23, 2020 3:07 pm
Location: Italy

XsFrm designer generates code files with ansi encoding

Post 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?
User avatar
Chris
Posts: 4562
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

XsFrm designer generates code files with ansi encoding

Post 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.

.
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
VR
Posts: 98
Joined: Sun Aug 23, 2020 3:07 pm
Location: Italy

XsFrm designer generates code files with ansi encoding

Post 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
User avatar
robert
Posts: 4225
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

XsFrm designer generates code files with ansi encoding

Post 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
XSharp Development Team
The Netherlands
robert@xsharp.eu
VR
Posts: 98
Joined: Sun Aug 23, 2020 3:07 pm
Location: Italy

XsFrm designer generates code files with ansi encoding

Post by VR »

Robert,

it was a form imported from VO.
User avatar
robert
Posts: 4225
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

XsFrm designer generates code files with ansi encoding

Post by robert »

Volkmar,

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

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
Post Reply