LCDproc and character encoding
#1
Hello folks,

I finally got my display working, and apart from some latency it works great with LCDproc and XBMC. The only issue I have is that the progress bar when playing a movie shows up something like this:
Code:
[ÿÿÿÿÿ       ]
Now I had a look at LCD.cpp and found out that there are basically two char mappings, one for the KS0073 controller and one for the rest of them. The other one is actually the mapping for the very popular HD44780 display.

I myself have a graphical display at 256x64 pixels and the text on it is rendered by LCDproc using the Freetype library and the Andale Mono truetype font. So what happens, XBMC sends the "block" character for the progress bar (0xAB), which gets remapped by the HD44780 mapping to 0xFF, which corresponds to the "ÿ" character in a normal ASCII charset and gets rendered as such on the display.

To resolve this issue, I could simply patch LCDproc and introduce another mapping that maps this char back to the correct value. However there are some things I don't understand yet:
  1. Why does XBMC have to do any remapping anyway? Isn't LCDproc supposed to know which display controller is used and apply the correct mapping?
  2. What about Unicode characters? In the font used for the rendering, all graphical gimmick symbols are >0xFF, so if XBMC's char mappings should be extended in order to solve the issue, it would have to support Unicode characters.

This issue should concern everyone with a non-alphanumeric but graphical display where font rendering from standard character maps is incorporated. Any thoughts?
Running XBMC on my HTPC, tablet, phone and pinball machine.
Always read the XBMC online-manual, FAQ and search the forums before posting. Do NOT e-mail Team-XBMC members asking for support. For troubleshooting and bug reporting, make sure you read this first.
Reply
#2
I ended up modifying the font I'm using for the rendering. This allowed me to create a special "progress bar block", which doesn't fill the whole height of the line. If someone's interested in the result, let me know.

Additionally, I submitted a patch for more flexible scrolling options in XBMC.
Running XBMC on my HTPC, tablet, phone and pinball machine.
Always read the XBMC online-manual, FAQ and search the forums before posting. Do NOT e-mail Team-XBMC members asking for support. For troubleshooting and bug reporting, make sure you read this first.
Reply
#3
I have commented out the single usage of this charset conversion function StringToLCDCharSet in xbmc/linux/XLCDproc.cpp and finally got russian characters (Movies names, etc) displayed on my iMon LCD Smile

The question for developers: why this conversion is needed? Especially when it always uses the first translation table (for HD44780) for all possible LCD devices? Can't it be handled all by lcdproc really?
Reply
#4
oleksiy Wrote:I have commented out the single usage of this charset conversion function StringToLCDCharSet in xbmc/linux/XLCDproc.cpp and finally got russian characters (Movies names, etc) displayed on my iMon LCD Smile

The question for developers: why this conversion is needed? Especially when it always uses the first translation table (for HD44780) for all possible LCD devices? Can't it be handled all by lcdproc really?

Bump

Same question here for me Smile

Thanks
Reply
#5
xens Wrote:Bump

Same question here for me Smile

Thanks

I think its legacy code for the xbox, no lcdproc there.
On Xbox you can choose between different Displays like HD44780 or Ksomething and an vfd

Or something like that
Reply
#6
^^^ what he said. there's no sane reason why they are there. most stuff probably talk utf-8 these days.
Reply
#7
Thanks for the answers !

as I understand a nice thing would be to extend LCDproc support, like adding an option into advancedsettings.xml to disable char remapping.

another thing that I don't understand:

The number of rows displayed by the LCD seems to be hardcoded to "4" into XLCDproc.cpp, but there's and option in advancedsettings.xml "<rows>" but this option has no effect to the numbers of rows displayed, so I think it's a bug ?
Reply
#8
I have created a small patch for the LCDproc support which:

1. disables charset remapping
2. changes System.PlayIcon to be correct lcdproc icons (play, pause, fwd, rev)
3. fires various LEDs on LCD screens (when playing video or music) like video/audio format LEDs (ac3, dts, xvid, divx, mp3, etc), S/PDIF icon for audio passthrough mode, speakers configuration icons (RL, 5.1, 7.1)

I have submitted a patch for anyone interested: http://trac.xbmc.org/ticket/10324
Reply
#9
Алексей А этот патч подойдет для Windows версии Imon?
Reply
#10
basovandrey Wrote:Алексей А этот патч подойдет для Windows версии Imon?

Имеется в виду windows версия XBMC? Нет, этот патч только для linux..
Reply
#11
oleksiy Wrote:..
Может знаете как сделать в Windows версии, что бы отображались русские буквы в индикации imon?
Reply
#12
basovandrey Wrote:Может знаете как сделать в windows версии, что бы отображались русские буквы в индикации imon?

К сожалению не знаю.
Reply
#13
А у вас в linux вся индикация работает на экранчике (системная информация, названия, эквалайзер и все другое, что есть в windows)?
Reply
#14
oleksiy Wrote:Имеется в виду windows версия XBMC? Нет, этот патч только для linux..

Please keep it in English! I don't want to use Google translate Wink
I have a issue to with LCDproc and character encoding. Except my LCD is a U204FB-A1
Reply
#15
Hi oleksiy. thanks for your patch.
what locale do you have? because I have problems with Cyrillic names on imonLCD with en_US.UTF8. will try uk_UA.KOI8U-U, but prefer UTF8.
I know there was discussion about UTF8 support on lcdpoc forum, but w/o any success and/or conclusions.
Reply

Logout Mark Read Team Forum Stats Members Help
LCDproc and character encoding1