Looking at Watlow_PM_Monitor.template in Notepad++ with the HEX editor installed, I see that it is already showing 0xC2 0xB0 (screenshot attached).
When I look at the Windows ANSI (windows-1252) code page, I see that 0xC2 is for Latin Capital letter A with circumflex, and 0xB0 is degree sign. So that explains why I’m seeing the double characters in Phoebus, though not what to do about
it.
Next I tried running “> caget -d CTRL_DOUBLE SP_Cesium:Oven_Heater:ProcessValue1 > bad.txt
That command always shows the strange character, regardless of what is displayed on the console. When I open that file in notepad++, I get the strange T character. When I look at the hex dump, it shows the “┬”
character is encoded as 0x2c 0x25. It also shows a “░” character with an encoding of 0x91 0x25.
‘file bad.txt’ from WSL reports:
bad.txt: Little-endian UTF-16 Unicode text, with CRLF line terminators
I don’t seem to get the strange character encoding when I run caget from linux, which would make sense if it’s somehow related to the windows codepage.
Greg
From: Kasemir, Kay <kasemirk at ornl.gov>
Sent: Monday, October 4, 2021 4:52 PM
To: Leblanc, Gregory <leblanc at ohio.edu>
Subject: Re: Odd characters in temperatures showing in Phoebus
Well, try to use some type of hex editor to edit the database file and make it
Well, that gives me some interesting results.
Full dump at:
https://pastebin.com/4iqDBfem
TL;DR:
> caget -d CTRL_DOUBLE SP_Cesium:Oven_Heater:ProcessValue1
Units:
┬░
> ssh elsewhere & return
> caget -d CTRL_DOUBLE SP_Cesium:Oven_Heater:ProcessValue1
Units: °
Same behavior using PowerShell and command prompt. I don’t see any change to $OutputEncoding before or after the ssh command, nor does manually setting $OutputEncoding = [System.Text.Encoding]::UTF8 make any difference. Chcp reports
the same active code page before and after ssh (437), so that doesn’t seem to be the right direction. I don’t have hexdump on windows, yet.
Greg
> caget SP_Cesium:Oven_Heater:ProcessValue1
SP_Cesium:Oven_Heater:ProcessValue1 22.855
Try
caget -d CTRL_DOUBLE SP_Cesium:Oven_Heater:ProcessValue1
and note the 'Units'.
Also try
caget -d CTRL_DOUBLESP_Cesium:Oven_Heater:ProcessValue1 | hexdump -c
to see exactly what characters follow the "Units:"...
Fundamentally, phoebus will allow UTF-8 encoded text for the units.
-Kay