Display and do not convert strings

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 3 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
Lembasts
Posts: 405
Last visit: Wed Mar 20, 2024 1:40 pm
Has voted: 1 time
Been upvoted: 1 time

Display and do not convert strings

Post by Lembasts »

To help you better we need some information from you.

*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***

Product, version and build: PS 170
32 or 64 bit version of product:64
Operating system:win10 1809
32 or 64 bit OS:64

*** Please add details and screenshots as needed below. ***

I have a script which does a string comparison. I typed the string '<='. However when I look at the code it converts '<=' to what appears to be a unicode 'less than or equals to' symbol. I cannot find an option that says 'leave strings alone and display only what has been entered instead of converting it'.
Thanks
David
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: Display and do not convert strings

Post by Alexander Riedel »

Could you provide a little more context please? Like that actual code and a screenshot of what you see?
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
Lembasts
Posts: 405
Last visit: Wed Mar 20, 2024 1:40 pm
Has voted: 1 time
Been upvoted: 1 time

Re: Display and do not convert strings

Post by Lembasts »

I am typing in two characters in the string like this: sideindicator -eq '<=' and sideindicator -eq '=>'
and they display like the attachment
Attachments
le.jpg
le.jpg (10.48 KiB) Viewed 4520 times
le.jpg
le.jpg (10.48 KiB) Viewed 4520 times
User avatar
brittneyr
Site Admin
Posts: 1655
Last visit: Thu Mar 28, 2024 8:47 am
Answers: 39
Been upvoted: 30 times

Re: Display and do not convert strings

Post by brittneyr »

So far we have had trouble reproducing this. Is it possible for you to upload your script? If so, please upload it here:
https://www.sapien.com/support/upload

What file encoding and line endings are you using? This can be found at the bottom-right on the status bar:
SPS_Encoding.png
SPS_Encoding.png (17.89 KiB) Viewed 4492 times
Brittney
SAPIEN Technologies, Inc.
User avatar
Lembasts
Posts: 405
Last visit: Wed Mar 20, 2024 1:40 pm
Has voted: 1 time
Been upvoted: 1 time

Re: Display and do not convert strings

Post by Lembasts »

The encoding was Windows 1252 but I changed it to UTF-bom-8 but it hasnt made a difference.
Unfortunately being a very secure environment I am not allowed to upload scripts.
I just typed '<=' and it converted it straight away so maybe the whole script is not necessary.
Does the font matter? Im using the new cascadia code.
User avatar
Lembasts
Posts: 405
Last visit: Wed Mar 20, 2024 1:40 pm
Has voted: 1 time
Been upvoted: 1 time

Re: Display and do not convert strings

Post by Lembasts »

btw - i know nothing about encoding. What encoding is recommended please?
User avatar
Lembasts
Posts: 405
Last visit: Wed Mar 20, 2024 1:40 pm
Has voted: 1 time
Been upvoted: 1 time

Re: Display and do not convert strings

Post by Lembasts »

Maybe the font is important: https://devblogs.microsoft.com/commandl ... adia-code/
Something to do with programming ligatures?
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: Display and do not convert strings

Post by Alexander Riedel »

Easy to try, select a different font.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
Lembasts
Posts: 405
Last visit: Wed Mar 20, 2024 1:40 pm
Has voted: 1 time
Been upvoted: 1 time

Re: Display and do not convert strings

Post by Lembasts »

I changed the font back to Consolas and it works now.
So today I learnt about ligatures and how awful they are!
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: Display and do not convert strings

Post by Alexander Riedel »

I guess we all learned that. We will look into this to see how ligatures can be turned off.
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 4 years and 3 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.