More > JRiver Media Center 27 for Linux

Quick Start Guide for Installing LCD Matrix on rPi, reading track info

<< < (3/5) > >>

Wheaten:
Hi Bob,

The issue is not with MC, but with Python.
Python V2 default to standard ASCII, this means the char 0 till 127.
So a letter like ä is char(132) which is not covered (0..127) and therefor it displays a weird sequence.

I've spend some considerable amount of time on this, and have no solution.
Maybe we have some python programmers, who have an solution.

bob:

--- Quote from: Wheaten on March 25, 2021, 12:55:19 pm ---Hi Bob,

The issue is not with MC, but with Python.
Python V2 default to standard ASCII, this means the char 0 till 127.
So a letter like ä is char(132) which is not covered (0..127) and therefor it displays a weird sequence.

I've spend some considerable amount of time on this, and have no solution.
Maybe we have some python programmers, who have an solution.

--- End quote ---
I've been testing with python3 and it still doesn't work but the issue appears to be with the Display, not python.
If I write specific characters by just replacing the ord(char) in the I2C_LCD_driver.py routine with specific characters, it's obvious that the upper half of the character set on the device is not utf-8

Wheaten:
It's a driver issue.
Did a small test with a different driver.

this piece of code shows a correct output, however the current driver (from the zip)  can't pass a charmap.


--- Code: ---#!/usr/bin/python
# -*- coding: utf-8 -*-
import os, sys
from RPLCD.i2c import CharLCD

lcd = CharLCD('PCF8574', 0x27,charmap='A00')
lcd.write_string(u'Vänskä')
--- End code ---


Wheaten:
Please conform if the script from the previous post is working for you. We don't have that many artists here with weird letters in their name. Only had 1 for testing. BjÖrk
If it's ok I will update my installation documentation in this topic.

bob:

--- Quote from: Wheaten on March 25, 2021, 04:57:40 pm ---It's a driver issue.
Did a small test with a different driver.

this piece of code shows a correct output, however the current driver (from the zip)  can't pass a charmap.


--- Code: ---#!/usr/bin/python
# -*- coding: utf-8 -*-
import os, sys
from RPLCD.i2c import CharLCD

lcd = CharLCD('PCF8574', 0x27,charmap='A00')
lcd.write_string(u'Vänskä')
--- End code ---



--- End quote ---
Yes, that works!

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version