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.
This topic is 4 years and 1 month old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
PsCustomObject
Posts: 137
Last visit: Thu Mar 28, 2024 3:34 am

Default file encoding

Post by PsCustomObject »

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: 1669
Last visit: Fri Apr 12, 2024 2:35 pm
Answers: 39
Been upvoted: 31 times

Re: Default file encoding

Post by brittneyr »

We are looking into this and will get back to you soon.
Brittney
SAPIEN Technologies, Inc.
User avatar
brittneyr
Site Admin
Posts: 1669
Last visit: Fri Apr 12, 2024 2:35 pm
Answers: 39
Been upvoted: 31 times

Re: Default file encoding

Post by brittneyr »

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
SAPIEN Technologies, Inc.
User avatar
PsCustomObject
Posts: 137
Last visit: Thu Mar 28, 2024 3:34 am

Re: Default file encoding

Post by PsCustomObject »

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: 1669
Last visit: Fri Apr 12, 2024 2:35 pm
Answers: 39
Been upvoted: 31 times

Re: Default file encoding

Post by brittneyr »

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
SAPIEN Technologies, Inc.
User avatar
brittneyr
Site Admin
Posts: 1669
Last visit: Fri Apr 12, 2024 2:35 pm
Answers: 39
Been upvoted: 31 times

Re: Default file encoding

Post by brittneyr »

Please try service build 5.7.173.
Brittney
SAPIEN Technologies, Inc.
This topic is 4 years and 1 month old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.