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 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.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
User avatar
Lembasts
Posts: 218
Joined: Thu Mar 15, 2012 9:47 am

Display and do not convert strings

Post by Lembasts » Sun Nov 17, 2019 8:52 pm

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: 7125
Joined: Tue May 29, 2007 4:43 pm

Re: Display and do not convert strings

Post by Alexander Riedel » Sun Nov 17, 2019 10:09 pm

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: 218
Joined: Thu Mar 15, 2012 9:47 am

Re: Display and do not convert strings

Post by Lembasts » Mon Nov 18, 2019 1:31 pm

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 1103 times
le.jpg
le.jpg (10.48 KiB) Viewed 1103 times

User avatar
brittneyr
Site Admin
Posts: 236
Joined: Thu Jun 01, 2017 7:20 am

Re: Display and do not convert strings

Post by brittneyr » Mon Nov 18, 2019 3:05 pm

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 1075 times
Brittney Ryn
SAPIEN Technologies, Inc.

User avatar
Lembasts
Posts: 218
Joined: Thu Mar 15, 2012 9:47 am

Re: Display and do not convert strings

Post by Lembasts » Mon Nov 18, 2019 3:23 pm

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: 218
Joined: Thu Mar 15, 2012 9:47 am

Re: Display and do not convert strings

Post by Lembasts » Mon Nov 18, 2019 3:26 pm

btw - i know nothing about encoding. What encoding is recommended please?

User avatar
Lembasts
Posts: 218
Joined: Thu Mar 15, 2012 9:47 am

Re: Display and do not convert strings

Post by Lembasts » Mon Nov 18, 2019 3:35 pm

Maybe the font is important: https://devblogs.microsoft.com/commandl ... adia-code/
Something to do with programming ligatures?

User avatar
Alexander Riedel
Posts: 7125
Joined: Tue May 29, 2007 4:43 pm

Re: Display and do not convert strings

Post by Alexander Riedel » Mon Nov 18, 2019 3:40 pm

Easy to try, select a different font.
Alexander Riedel
SAPIEN Technologies, Inc.

User avatar
Lembasts
Posts: 218
Joined: Thu Mar 15, 2012 9:47 am

Re: Display and do not convert strings

Post by Lembasts » Mon Nov 18, 2019 3:41 pm

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: 7125
Joined: Tue May 29, 2007 4:43 pm

Re: Display and do not convert strings

Post by Alexander Riedel » Mon Nov 18, 2019 3:45 pm

I guess we all learned that. We will look into this to see how ligatures can be turned off.
Alexander Riedel
SAPIEN Technologies, Inc.