decolector / input

Software desarrollado para el proyecto "Input" de Ana Maria Montenegro Jaramillo ( http://montenegrojaramillo.com )
MIT License
1 stars 1 forks source link

Special characters in messages are not displayed in led sign #3

Open decolector opened 10 years ago

decolector commented 10 years ago

Characters not inside the basic ascii codes are not displayed in the led sign. It seems to be due to a limitation in the jetfile library because it is causing an exception when creating the message string.

This could be solved by including a special configuration command in the message content that allows these characters to be displayed.

According to the JetFile 2.8.7 protocol specification [1], the control character '0x17' allows the insertion of extended ascii codes ( 0 - 255 ) in the message content. This could be tested with the following line:

echo  '015A3030024141061B30621C311A310A49310A4F311757826C636F6D6504'|xxd -r -p | nc 192.168.1.101 9520

That should display the message "Wélcome", where:

'015A3030024141061B30621C311A310A49310A4F31 + 17(extended ascii control char) + 57 + 82(special char é) + 6C636F6D6504'

Since i don't have a screen at hand to test it i can't confirm that, because I'm not sure in which position it must be inserted. But if it works, this character should be added to the markup in the LEDsign library in order to support extended ascii.

[1] https://github.com/decolector/LEDSign/blob/master/doc/JetFileIIv2.8.7(EN).pdf ,page 176

z3a commented 10 years ago

confirmed!

the character 0x17 must precede the extended ascii character: 17E9 produces é.

The following line was the test I ran with the display:

echo  '015A3030024141061B30621C311A310A49310A4F3117E117E917ED17F317FA04'|xxd -r -p | nc 192.168.1.101 9520

the output in the screen is: áéíóú

decolector commented 10 years ago

I've updated the JetFile library including the tag {extascii} that must be inserted before each special char.
You can find it here: 66481f6

I've included a function that inserts the tag in display.py as well, here is the commit.

Let me know if it works with the sign.

z3a commented 10 years ago

I tested the library patch and it inserts the extascii tag into the string that is sent to the display