Saved Script 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 11 years and 5 months 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
bn2hunt
Posts: 101
Last visit: Mon Aug 02, 2021 12:04 pm

Saved Script encoding

Post by bn2hunt »

Can you tell me what file encoding you are using to save the powershell files? And if it isn't UTF-8 is there a way to change it? We are in the process of moving to GIT for our company wide source control and it is looking at ps1 files as a binary file. One of the workarounds that has been found it to change the encoding to utf-8 for files that are created using powershell-ise so I was wondering if that might be my issue as well.

Thanks

Dan
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Saved Script encoding

Post by davidc »

When a file is open in PowerShell Studio, the file's encoding is displayed in the right hand side of the status bar. You have the option to change the file's encoding by using the script editor's context menu.

Note: PowerShell Studio default encoding for new files is UTF-8, but it will always preserve the encoding of the original file.

David
David
SAPIEN Technologies, Inc.
This topic is 11 years and 5 months 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.