You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This error appears if the Raspberry Pi does not have UTF-8 character set selected.
An example startup output...
Hostname: raspberrypi
Locale: ('en_US', 'ISO8859-1')
...
File "/home/pi/pilomar/src/textcolor.py", line 409, in TextBox
print(line)
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 19-89: ordinal not in range(256)
The text was updated successfully, but these errors were encountered:
The clue is in the output 'Locale: ('en_US', 'ISO8859-1').
The second item should be 'UTF-8'. Pi-lomar expects a UTF-8 environment.
In this case the operating system configuration is incorrect.
This can be fixed via the Raspberry Pi Configuration utility.
Go to the Localisation tab.
Select Set Locale.
Change the Character Set to UTF-8
Accept [OK] the changes then reboot the RPi.
The detection and error message will be improved in the next pi-lomar release.
Found that the main cause of failure are the special characters in the SYMBOLS dictionaries in src/pilomar.py and src/textcolor.py. These are the characters for linedrawing, arrows, degree symbol etc. If the program recognises that the locale character set is not UTF-8 it should be possible to select an alternative SYMBOLS dictionary which is restricted to 7bit ASCII characters only.
This error appears if the Raspberry Pi does not have UTF-8 character set selected.
An example startup output...
The text was updated successfully, but these errors were encountered: