Encoding Problems since Update to v5.6.160

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 5 years and 1 week 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
dvokog
Posts: 4
Last visit: Wed Mar 06, 2024 4:04 am

Encoding Problems since Update to v5.6.160

Post by dvokog »

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.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Encoding Problems since Update to v5.6.160

Post by davidc »

Hello,

We will be happy to assist you. Please answer the following questions before we can investigate further:

1. If possible, please zip the project and upload it here:

https://sapien.com/support/upload

At the minimum, if you can upload the psbuild file for the project, that will help us try to recreate the issue.

2. Are you using the "Resolve and include external scripts" packager option?
Options- Resolve and Merge.png
Options- Resolve and Merge.png (30.07 KiB) Viewed 3698 times
Thank you,
David
SAPIEN Technologies, Inc.
User avatar
dvokog
Posts: 4
Last visit: Wed Mar 06, 2024 4:04 am

Re: Encoding Problems since Update to v5.6.160

Post by dvokog »

Thank you for your answer,

I have just uploaded the project.
Yes this option is enabled for my project. When I disable the option and deploy it with the v5.6.160 it works well too.

With the older version of Powershell Studio it doesn´t metter if the option is enabled or disabled - both is working.

Maybee you can reproduce this issue.

PS: Because you already have my project files, maybee you can give me a tip to improve the startup time (when you starte the EXE). We know this delay from other created PS GUI applications too...
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Encoding Problems since Update to v5.6.160

Post by davidc »

We got the files. Can you point me to the correct right file / line where the text is set and where the text is generated?

Thank you,
David
SAPIEN Technologies, Inc.
User avatar
dvokog
Posts: 4
Last visit: Wed Mar 06, 2024 4:04 am

Re: Encoding Problems since Update to v5.6.160

Post by dvokog »

generated in Globals.ps1 --> function "Test-PWRequirements"
and displayed / set as label text in both form files --> Event $btnLoginPWÄndern_Click and Event $btnActionPWChangeSubmit_Click
in both events the exact code position are the lines like that:
$resultPWCheck = Test-PWRequirements -Password $textActionPWChangePW1.Text
if ($resultPWCheck -ne $true) {
$labeActionPWChangeInfo.Text = $resultPWCheck
}
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Encoding Problems since Update to v5.6.160

Post by davidc »

One more question:

If you run the project directly in PowerShell Studio, does the same issue occur?
David
SAPIEN Technologies, Inc.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Encoding Problems since Update to v5.6.160

Post by davidc »

And can you provide a screenshot of what you see on your end?

Thank you,
David
SAPIEN Technologies, Inc.
User avatar
dvokog
Posts: 4
Last visit: Wed Mar 06, 2024 4:04 am

Re: Encoding Problems since Update to v5.6.160

Post by dvokog »

here is a screenshot.
2019-03-20 17_17_07-Mein Konto - __Remote.png
2019-03-20 17_17_07-Mein Konto - __Remote.png (2.78 KiB) Viewed 3630 times
But I cannot test it locally on my PC/Notebook (running in Powershell Studio) because actually there is no access to our domain (Active Directory). So for testing I have to deploy it and run the EXE on a remote machine which is a domain member. But I am sure you have my files and can change the code easyly a little bit to test it by yourself :-)
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Encoding Problems since Update to v5.6.160

Post by davidc »

I have located the issue and it is indeed a result of the "Resolve and include external scripts". Therefore, disabling the option is the work around solution.
I asked the dev team look into why it is breaking the encoding.
David
SAPIEN Technologies, Inc.
This topic is 5 years and 1 week 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.