Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Degree Symbols

    Scheduled Pinned Locked Moved Solved
    Duet Web Control
    5
    15
    838
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • dc42undefined
      dc42 administrators @handyandy
      last edited by

      @handyandy DWC should display the degree symbol as long as you represent it correctly. So make sure that whatever editor you are using saves the text with UTF8 encoding.

      Duet WiFi hardware designer and firmware engineer
      Please do not ask me for Duet support via PM or email, use the forum
      http://www.escher3d.com, https://miscsolutions.wordpress.com

      handyandyundefined 1 Reply Last reply Reply Quote 0
      • handyandyundefined
        handyandy @dc42
        last edited by

        Hi, Thanks for that. I had been using the keyboard special character Alt-248 which does indeed show a degree symbol in my text editor of choice.
        I will now do a test on one of the macros using Alt-0176 and see if this sorts it?
        Hope so.

        handyandyundefined 1 Reply Last reply Reply Quote 0
        • handyandyundefined
          handyandy @handyandy
          last edited by

          Hi, Sorry to be a pain but I am still unable to display degree symbols in DWC!
          I have edited the filament files to correctly show degree symbols in both my favourite Multi-Edit and Notepad text editors.
          I have tried using both alt-248 and alt-0176 but when I transfer and look at the files in DWC the degree symbol displays as an orange triangle with a question mark in its place.
          I presume this means an error as the files won't run either?

          chrishammundefined 1 Reply Last reply Reply Quote 0
          • chrishammundefined
            chrishamm administrators @handyandy
            last edited by

            @handyandy How are you trying to display it? I just tried it using a simple command on DWC and it worked:

            echo "Heater 0 is " ^ sensors.analog[0].lastReading ^ "°C hot"
            Heater 0 is -273.1°C hot
            M118 S"Test: 100°C"
            

            I see the same result when I put it into a macro file and run it.

            Duet software engineer

            handyandyundefined 1 Reply Last reply Reply Quote 0
            • handyandyundefined
              handyandy @chrishamm
              last edited by

              Hi, I tried that and on my printer this is what I get...

              12/04/2022, 10:14:53 M98 P"0:/macros/Test"
              Heater 0 is 19.6�C hot
              Error: Bad command: Heater 0 is -273.1�C hot
              Test: 100�C

              handyandyundefined 1 Reply Last reply Reply Quote 0
              • handyandyundefined
                handyandy @handyandy
                last edited by

                Hi again, If I type directly into the 'send' box the following...
                echo " Temp is °C"
                It works fine and displays correctly. Seems to be as soon as I put it in a macro.
                Confused!

                infiniteloopundefined chrishammundefined 2 Replies Last reply Reply Quote 0
                • infiniteloopundefined
                  infiniteloop @handyandy
                  last edited by infiniteloop

                  @handyandy Try to edit your macro under the System or Macros tab in DWC. If you enter <alt / 248> there, you should see the degree symbol like this: "°C". Save and run - it will work.
                  The problem seems to be some weird encoding used by your editor of choice - looks like "Roman-8" but not like UTF8 unicode.

                  1 Reply Last reply Reply Quote 0
                  • chrishammundefined
                    chrishamm administrators @handyandy
                    last edited by

                    @handyandy I think @infiniteloop has a good point. Do you edit your macros in DWC or on your PC? If it's edited on the PC, you must set the encoding to UTF-8. If you use the browser, please let me know what browser you are using and I'll try to reproduce the problem here.

                    Duet software engineer

                    handyandyundefined 1 Reply Last reply Reply Quote 0
                    • handyandyundefined
                      handyandy @chrishamm
                      last edited by

                      Hi, I am using Multi-Edit (or Notepad) both produce the same results. I am running Windows 11 and am using Edge as the browser.
                      Hope this helps.

                      infiniteloopundefined dc42undefined 2 Replies Last reply Reply Quote 0
                      • infiniteloopundefined
                        infiniteloop @handyandy
                        last edited by

                        @handyandy The character � stands for an unrecognised code point (aka character). This often happens if files are stored in 8-bit ASCII, or sometimes with sparsely populated unicode character sets, too. I won’t debate your choice of editors - the question is what character sets they operate with and how they store their files. That depends on user settings.

                        Did you check my proposal to edit your macro directly from within DWC?

                        1 Reply Last reply Reply Quote 0
                        • dc42undefined
                          dc42 administrators @handyandy
                          last edited by

                          @handyandy those are both very old editors. Do they offer the ability to save the file in UTF8 encoding? If not then I suggest you use a different editor such as Notepad++.

                          Duet WiFi hardware designer and firmware engineer
                          Please do not ask me for Duet support via PM or email, use the forum
                          http://www.escher3d.com, https://miscsolutions.wordpress.com

                          chrishammundefined 1 Reply Last reply Reply Quote 0
                          • chrishammundefined
                            chrishamm administrators @dc42
                            last edited by

                            Notepad on Win11 lets you select the encoding:

                            dc96e9e9-99da-4c54-8452-d5795b1a2ea5-image.png

                            Make sure it is set to UTF-8 or try to edit the macro directly in DWC.

                            Duet software engineer

                            handyandyundefined 1 Reply Last reply Reply Quote 0
                            • handyandyundefined
                              handyandy @chrishamm
                              last edited by

                              Hi, I took on board your comments about my old text editors and looked at Notepad++... I didn't like it. The GUI seems very 'home made in my shed'.
                              I did however find the 'Atom' editor being recommended so have also tried this. I like it a lot.
                              It has a really nice and modern looking GUI. It allowed me to load my whole SD card into it as a project. I could then set up my Find/Replace criteria and quickly apply them throughout the project. Brilliant.
                              I can now also display degree symbols correctly!
                              Cheers all.

                              1 Reply Last reply Reply Quote 1
                              • dc42undefined dc42 marked this topic as a question
                              • dc42undefined dc42 has marked this topic as solved
                              • First post
                                Last post
                              Unless otherwise noted, all forum content is licensed under CC-BY-SA