Encoding Problems since Update to v5.6.160
Posted: Tue Mar 19, 2019 3:45 am
I have a Powershell Projekt with a GUI Form created and developed with Powershell Studio 2019.
Yesterday i installed the new Version (Update) 5.6.160 on my Win 10 notebook.
Today i changed some lines of code in my Project and deployed it as EXE.
In my project, in the Form.psf there is a button click event that calls a function written in the Globals.ps1 file.
This function (in my case it´s called 'Test-PWRequirements') just do some tests and returns a simple String.
So if you click the button the return value (String) of my function is set as text of a label in my GUI form.
And here is the problem:
If my function returns a String containing a special character (Germany) e.g. 'ß', 'Ä', ... the text won´t be displayed correctly in my GUI.
-> If i set the same text in the code of the click event directly without calling my function, it works. The characters are displayed correctly.
Because i didn´t find a solution for that, after some hours i tried to open my project on my Win7 PC where is still v5.5.155 of Powershell Studio 2019 is installed. I opened the project, deployed it as EXE and ... WOW! there are no problems! (with the same code - no changes, just click again to deploy it)
By the way:
Both versions of Powershell Studio shows me for all files of the project 'UTF-8' as encoding at the right-bottom corner.
Yesterday i installed the new Version (Update) 5.6.160 on my Win 10 notebook.
Today i changed some lines of code in my Project and deployed it as EXE.
In my project, in the Form.psf there is a button click event that calls a function written in the Globals.ps1 file.
This function (in my case it´s called 'Test-PWRequirements') just do some tests and returns a simple String.
So if you click the button the return value (String) of my function is set as text of a label in my GUI form.
And here is the problem:
If my function returns a String containing a special character (Germany) e.g. 'ß', 'Ä', ... the text won´t be displayed correctly in my GUI.
-> If i set the same text in the code of the click event directly without calling my function, it works. The characters are displayed correctly.
Because i didn´t find a solution for that, after some hours i tried to open my project on my Win7 PC where is still v5.5.155 of Powershell Studio 2019 is installed. I opened the project, deployed it as EXE and ... WOW! there are no problems! (with the same code - no changes, just click again to deploy it)
By the way:
Both versions of Powershell Studio shows me for all files of the project 'UTF-8' as encoding at the right-bottom corner.