Meshoulam, Arnon
2004-09-12, 07:36
I have a collection which consist of Hebrew tags. Using the font
mapping, I can correctly map the tags into Hebrew fonts, but as expected
they are being displayed left to right - i.e. end of word first.
I am thinking of the options to add right-to-left support:
Looking at CPAN:MP3:Info, support for Unicode is rather poor and no
support is included for L2R and R2L.
Windows and Unix OS manage to do it correctly, but I can't figure out
when they decide to swap the string around
Possible solutions I can think of:
* Swap the string around when read from the tags. To do so, it
would need to sit above the tagFunctions in Slim:Music:Info The function
could detect charsets above the standard latin-1 (or specifically
English) and opt to reverse the string
* Switch could be server setting, or specifically for a sub-set.
For example all songs under the directory XXXX
* Modify the individual handlers to swap the strings - a bit more
work and redundant
* Modify the Display handler (haven't found out where yet) to do
the same as above
Only problem I can see with these solutions is that they will not handle
mixed language strings, unless I go down to work processing which is
much trickier and could affect performance. What I mean is that:
<Best of Abba> (all in Hebrew/Arabic) would be displayed correctly
Best of Abba (All in English) would be displayed correctly
Best of <Abba> (only Abba in Hebrew/Arabic) would probably be displayed
as <Abba> fo tseB
Also haven't thought about a solution for the database backend
Any ideas/feedbacks on this.
Arnon
mapping, I can correctly map the tags into Hebrew fonts, but as expected
they are being displayed left to right - i.e. end of word first.
I am thinking of the options to add right-to-left support:
Looking at CPAN:MP3:Info, support for Unicode is rather poor and no
support is included for L2R and R2L.
Windows and Unix OS manage to do it correctly, but I can't figure out
when they decide to swap the string around
Possible solutions I can think of:
* Swap the string around when read from the tags. To do so, it
would need to sit above the tagFunctions in Slim:Music:Info The function
could detect charsets above the standard latin-1 (or specifically
English) and opt to reverse the string
* Switch could be server setting, or specifically for a sub-set.
For example all songs under the directory XXXX
* Modify the individual handlers to swap the strings - a bit more
work and redundant
* Modify the Display handler (haven't found out where yet) to do
the same as above
Only problem I can see with these solutions is that they will not handle
mixed language strings, unless I go down to work processing which is
much trickier and could affect performance. What I mean is that:
<Best of Abba> (all in Hebrew/Arabic) would be displayed correctly
Best of Abba (All in English) would be displayed correctly
Best of <Abba> (only Abba in Hebrew/Arabic) would probably be displayed
as <Abba> fo tseB
Also haven't thought about a solution for the database backend
Any ideas/feedbacks on this.
Arnon