How to change compiled EXE console font ?

Use this forum to ask questions after your subscription maintenance expires or before you buy. Need information on licensing or pricing? Questions about a trial version? This is the right place for you. No scripting questions, please.
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE 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.
This topic is 10 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
sivandavid
Posts: 14
Last visit: Wed Jun 21, 2023 3:45 am

How to change compiled EXE console font ?

Post by sivandavid »

I have a script that uses Unicode characters that appear as question marks after compiling the file to EXE as the EXE file uses "Consolas" font that doesn't support Unicode.
on my native Poweshell console which is using font "Courier New" everything looks ok.
how can I change the default font for compiled EXE file from consolas to Courier New ?
User avatar
brittneyr
Site Admin
Posts: 1655
Last visit: Thu Mar 28, 2024 9:46 am
Answers: 39
Been upvoted: 30 times

Re: How to change compiled EXE console font ?

Post by brittneyr »

[Topic moved by moderator to Former and Future Customers - Questions forum]
Brittney
SAPIEN Technologies, Inc.
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: How to change compiled EXE console font ?

Post by Alexander Riedel »

A script packaged as a console application (assuming that is what you did) does not set any font by itself.
It uses the font that is configured on a system for that particular console.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
sivandavid
Posts: 14
Last visit: Wed Jun 21, 2023 3:45 am

Re: How to change compiled EXE console font ?

Post by sivandavid »

so maybe it's a codepage issue ?
I use a 2 unicode signs [char]0x2714 and [char]0x2716 in my code.
when I run my script in windows powershell it shows the signs correctly and even in powershell studio editor it looks ok as you can see in the image below.
Image

but when I compile it to EXE it shows as question marks, how can I make it appear just like in the editor and in windows powershell ?
thanks
David
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: How to change compiled EXE console font ?

Post by Alexander Riedel »

What actual packager engine are you using? And what version of what product do you use?
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
sivandavid
Posts: 14
Last visit: Wed Jun 21, 2023 3:45 am

Re: How to change compiled EXE console font ?

Post by sivandavid »

Product is Powershell Studio 2016
package you can see the image
Image
David
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: How to change compiled EXE console font ?

Post by Alexander Riedel »

2023-05-28_9-20-08.png
2023-05-28_9-20-08.png (60.06 KiB) Viewed 4538 times
In the current version this looks like this. You do have to make sure your script file is saved
as Unicode (UTF-16-LE) before packaging.
I am not sure if the 2016 had an encoding selector on the status bar already or not, sorry.
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 10 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.