Default file encoding

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
User avatar
PsCustomObject
Posts: 87
Joined: Tue Apr 29, 2014 1:55 am

Default file encoding

Post by PsCustomObject » Wed Jan 22, 2020 3:27 am

Product: PowerShell Studio 2020 (64 Bit)
Build: v5.7.172
OS: Windows 10 Enterprise (64 Bit) 1909
Build: v10.0.18363.0

Hello,

more than a support this is a more general question, I've noticed that the latest build is creating new PS1 files with UTF-8-BOM encoding vs UTF-8.

I'm not sure if this is intended/by design but is there a way to change the default encoding? I have a requirement to have files in UTF-8 and can be tedious changing this on every new file I create (with a 100% success rate of me forgetting to do so).

The other question is in regard to the editor option "Show white spaces" is there an option to hide newline characters? I am interesting in showing dots for white spaces but would like to hid the new line character only. If not I'll be glad to open a feature request.

Thanks!

User avatar
brittneyr
Site Admin
Posts: 307
Joined: Thu Jun 01, 2017 7:20 am

Re: Default file encoding

Post by brittneyr » Thu Jan 23, 2020 8:49 am

We are looking into this and will get back to you soon.
Brittney Ryn
SAPIEN Technologies, Inc.

User avatar
brittneyr
Site Admin
Posts: 307
Joined: Thu Jun 01, 2017 7:20 am

Re: Default file encoding

Post by brittneyr » Thu Feb 06, 2020 5:12 pm

Upon further investigation, it appears that the templates for PowerShell Studio encoding were changed. We are currently looking into a fix for this.

As for the other matter, that is not a feature at the moment. You are welcome to file a feature request and we will see what we can do:
https://www.sapien.com/requests
Brittney Ryn
SAPIEN Technologies, Inc.

User avatar
PsCustomObject
Posts: 87
Joined: Tue Apr 29, 2014 1:55 am

Re: Default file encoding

Post by PsCustomObject » Thu Feb 20, 2020 6:17 am

Many thanks Brittney is there any update/ETA on this?

I'm asking as just noticed that editing some existing scripts will not retain previous encoding so if I don't remember to update this before commit is gonna reflect in the git repository making comparis between commits a pain.

Thanks in advance for any update.

User avatar
brittneyr
Site Admin
Posts: 307
Joined: Thu Jun 01, 2017 7:20 am

Re: Default file encoding

Post by brittneyr » Mon Feb 24, 2020 10:24 am

We have decided to keep the default encoding in the templates as UTF-8-Bom. We are currently adding an option to set the default encoding for new files. This should be included in the next service build that will be released soon.
Brittney Ryn
SAPIEN Technologies, Inc.