Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: %artist% writen in hebrew is incorrectly displayed in default library viewer (Read 1329 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

%artist% writen in hebrew is incorrectly displayed in default library viewer

foobar2000 1.3.14 beta 1, default library viewer (album list), sorting/displaying pattern %album%[ '['%album artist%']']|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%.
As you can see in screenshot, album Yodh of artist מזמור with total tracks 5 is displayed incorrectly. %totaltracks% is displayed before %album% and square brackets are out of place.

Here is how album is  tagged:

Re: %artist% writen in hebrew is incorrectly displayed in default library viewer

Reply #1
This is an artifact of bi-directional text rendering. This feature is built into standard Windows text drawing routines as part of the operating system's Unicode support. The issue at hand is that the text used mixed direction. Hebrew renders right-to-left whereas latin  characters render left-to-right. The punctuation marks - here: round and square brackets - are neutral characters. Their rendering depends on the surrounding text. In your example it looks like there are only opening/left brackets but half of them are actually visually flipped closing/right brackets. If you want to control the direction you can insert a left-to-right mark (‎ or ‎ in HTML, $char(8206) in title formatting) or a right-to-left mark (‏ or ‏ in HTML, $char(8207) in title formatting) after punctuation marks. Try putting $char(8206) after %artist% or after the closing bracket after %artist%.

You can experiment by putting the following code into a .html file and opening it in your browser:
Code: [Select]
<html><body>
<p>Yodh [מזמור] (5)</p>
<p>Yodh [&rlm;מזמור&lrm;] (5)</p>
<p>Yodh [מזמור‎] (5)</p>
<p>Yodh [מזמור]&lrm; (5)</p>
</body></html>
At least in Chrome the first line renders just as in your screenshot.
Edit: It looks like the forum translates numeric HTML entities when hitting the post button.

Re: %artist% writen in hebrew is incorrectly displayed in default library viewer

Reply #2
Try putting $char(8206) after %artist% or after the closing bracket after %artist%.
Thanks. %album%[ '['%album artist%']'$char(8206)]|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title% did the trick.

 

Re: %artist% writen in hebrew is incorrectly displayed in default library viewer

Reply #3
So Hebrew is The New One-Man Extreme Metal Band Alphabet? ;-)  I only have a very few right-to-left's, so I have entered the left-to-right mark in the tag itself. Be warned though, that "Quicksearch for same" is "left-to-right mark sensitive".