Can you display other characters in Shift-JIS, like セ ゼ or ゾ タ?
I can display those but don’t succeed with ソ, which is odd…
Any chance you can use UTF-8 encoding? You’ll have to use USART Editor to generate the font, but you can then use that .zi file in Nextion Editor as well. I can display the ソcharacter using UTF-8 encoding/font.
Nextion doesn’t do any special encoding escape sequences, only 3 special sequences are defined in the reference -see below-. It expects the bytes in the same encoding as the font you’re using for that object. If you paste the text in the txt property of a field, the editor will convert it to the proper bytes.
You can get/set the bytes in debug mode using: get t0.txt. The HEX string returned will start with 70 and end with FF FF FF. The bytes in between are the byte representation of your string:
I think ソ should be HEX bytes “83 5C” but I can’t get that to show. To me it seems a bug in the shift-jis implementation… hence my advice to try UTF-8.
Note that byte 5C is the backslash that is also used in 3 predefined escape sequences. It seems to be throwing off the decoder:
Character escaping is performed using two text chars: \r creates 2 bytes 0x0D 0x0A, \” 0x22 and \ for 0x5C
After some more research, I found that you need to add a backslash after the character, which is counter-intuitive to say the least:
What happens is the bytes for ソ are 83 5C, but 5C is the backslash and the escape character. Since the following quote would be escaped, you need to add another backslash to make the escape sequence correct…
Seems that the decoder is not at fault, but the encoder should have added that additional backslash which is required.