Announcement

Collapse
No announcement yet.

Print/Write Special characters

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Print/Write Special characters

    Hello,

    Hope it goes well?

    I'm trying to write the following special characters to a text File on a SD card such as:

    (Please see attached file)

    But it keeps replacing it with wrong data, so I tried printing it using print("");but it's not even showing on the screen.

    Please help.

    Regards

    Jacques
    Attached Files
    Last edited by JacquesJJ; 6th June 2016, 05:13 PM.

  • #2
    Those characters are not part of the standard ANSI character set. So to produce them you will need to use a usD based unicode font and use putch to put the unicode character.

    If you are happy with the internal character sets and don't use or want to use a uSD then you can create a small internal font that just contains those characters, but it will be a bit messy to use.
    Mark

    Comment


    • #3
      I'm using the Visi environment, is there maybe someway you can show me an example on how to use the usD based Unicode font and putch?

      Jacques

      Comment


      • #4
        Have a look at the Picaso ViSi, strngs demo
        Mark

        Comment


        • #5
          Then you can use charmap on Windows to find the hex code for the character you want and then putch that.

          eg the code for the ae character is 0xe6

          so putch(0xe6) would show it.
          Mark

          Comment


          • JacquesJJ
            JacquesJJ commented
            Editing a comment
            I tried using putch(0xe6) and it's still not showing anything

        • #6
          Sorry your example is not showing?

          Jacques

          Comment


          • #7
            It stops at eg the code for...

            Jacques

            Comment


            • ESPsupport
              ESPsupport commented
              Editing a comment
              Looks like the forum doesn't like 'special' characters, I have retyped it without any

          • #8
            putch() only works with characters that's already in the Ascii table

            Jacques

            Comment


            • #9
              Open the sample I mentioned and put the code below starting at about line 95, compile load and run

              Code:
                  txt_FontID(hFont2) ;    // font2 is unicode
                  putch(0xE6) ;
                  pause(10000) ;
              Mark

              Comment


              • #10
                I think I have the wrong sample, I only have 28 lines, can you please send me the link to the sample you mentioned?


                Jacques

                Comment


                • #11
                  It inside workshop, File, Samples, Picaso ViSi, Strings Demo.
                  Mark

                  Comment


                  • #12
                    Found it and pasted the code like instructed, still only shows when I add a hex value from the Ascii but no special characters.

                    Comment


                    • #13
                      Use file, zip project and attach what you have here
                      Mark

                      Comment


                      • #14
                        Please see attached file

                        Jacques
                        Attached Files

                        Comment


                        • #15
                          Check that the files copied to the uSD are the same as in the file_LoadImagecontrol() statement, i.e "STRING~1.da2" and "STRING~1.gc2"

                          Also, when the 10 seconds has elapsed, if you push the down button you should get Japanese characters on the first press and cryllic script on the second.

                          Do you get that?
                          Mark

                          Comment

                          Working...
                          X