Browser rendering of mixed language chars?

As I try to set up my OPAC to display non-roman chars (what the librarians call ‘vernacular’, which seems odd to me, I’ll stick with ‘non-roman’), I have run into a really weird thing with the way browsers are displaying text that has mixed Roman and Hebrew characters. This doesn’t seem to effect any other non-roman chars we have, I can only guess it’s somehow related to the right-to-left-ness of Hebrew, but it’s weird.

Check out my simple reproduced test-case, and see if you can tell me what the heck is going on. Any advice appreciated. (Even once I figure out what’s going on, and even if I can identify a fix, there’s no telling if I can get my OPAC to act that fix. But anyway.)

See my reproduced simple demonstration:

http://bart.mse.jhu.edu/rochkind/weirdhebrew.html

This entry was posted in programming. Bookmark the permalink.

One Response to Browser rendering of mixed language chars?

  1. jrochkind says:

    I actually just figured this out. Sort of. It’s hard even to explain.

    But basically, the browser knows that strings of Hebrew chars should be displayed right-to-left. The problem is that the comma and the dash are used in Hebrew too, so the browser is glomming those onto the section it decides is “Hebrew”, and putting them right-to-left at the “end”.

    I now know how to make it do what I thought it should have done if coding the HTML by hand. See:

    מ , 1-

    But now I’m unsure if that’s the “right” way to display a Hebrew authority heading! And I don’t know if I can make my OPAC do that anyway.

    Any ideas on what the “right” way to display a Hebrew authority heading is? I think I should probably actually put the whole thing rtr instead of ltr.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s