`chr(` function gives different results in PanX to Pan6


#1

In Panorama 6, chr(161) produces the degree symbol. In Panorama X, it produces an upside-down exclamation mark. Do I interpret this to mean that any chr( usage in Panorama 6 with an argument greater than 127 is likely to give a different result in Panorama X?


#2

Hi Michael, why would you use chr( instead of just using the character - ˚?
Tom


#3

Good question Tom - I suspect that I forgot the keystrokes for the degree symbol.


#4

Okay. I just wondered if there was some advantage that I did not know about. Tom


#5

Yes. Panorama 6 uses MacOS Roman encoding, Panorama X uses Unicode encoding. These two systems have different characters for values between 128-255. Also, BTW, in Panorama 6 the character values only go up to 255, in Panorama X they can be much larger.


#6

Would there be a reason that a user would want to use an encoding other than Unicode UTF-8? (which is what I’m imagining Panorama X is using)

Robert Ameeti
(949) 422-6866


#7

Unicode code points are independent of whether you are using UTF-8, UTF-16, or UTF-32. The chr( function uses the code point.


#8

Ok. I was overly specific.

Might someone want to not use Unicode but rather Roman?

Compatibility with other interchangeable data?

Robert Ameeti


#9

This can be handled during export by the texttobinary( function

and during import by binarytotext(

The clipboard also offers more than one encoding to the application you are pasting into. If you copy from Panorama 6, and paste into Panorama X, you will be copying Mac Roman, and pasting Unicode. Going the other way, the process is reversed.