Opened 16 years ago

Last modified 12 years ago

#956 closed defect

Hebrew Characters Support — at Version 11

Reported by: dmorissette Owned by: dmorissette
Priority: high Milestone: 5.2 release
Component: MapServer C Library Version: 4.3
Severity: normal Keywords:
Cc: dannys@…, eshabtai@…, aboudreault, woodbri

Description (last modified by dmorissette)

In bug 858 we added multibyte encoding support, but it seems that this doesn't
work for languages written from right to left such as Hebrew:

Danny Stopel (Anywhere Ltd) wrote:
> Hello again Daniel!
> Sorry to disturb you, but I succeeded to download binaries of MS4.3
> (from
> I also succeeded to display Hebrew, but backwards :(
> Hebrew is a right to left language. I've tried all possible encodings
> from 
> but none of them worked right. The only thing I need is some property of
> label to reverse the string before displaying it. Is such thing exists
> in MS?
> Sorry again for disturbing you and thanks for help!
> Danny Stopel

Change History (16)

comment:1 Changed 16 years ago by dmorissette

Status: newassigned
Um... seems that it won't be a simple one to deal with. Iconv's website says
nothing about right-to-left vs left-to-right. Just to make things worse, Hebrew
characters go from right to left, but numbers and english words embedded into
the text still go right to left and need to be taken into account.

Here are a few resources I found on the web:

Intro to computing in Hebrew:

The Hebrew HOWTO:

IGLU FAQ (The Israeli Group of Linux Users)

comment:2 Changed 16 years ago by dmorissette

Found the GNU FriBidi library, it seems that this library would be able to
convert a bidirectional string from logical to visual character ordering for
graphical presentation:

comment:3 Changed 16 years ago by dmorissette

Okay, more news: it seems that freetype 2.1.2 and more recent adds OpenType
Support which might be the simple solution to our current problem:

The maptools windows binary that Danny used was built with Freeetype 2.1.3, so
it should include this openType stuff if the information that I found is right.
Maybe the solution is simply to use an font that includes this OpenType stuff?

I don't have time to research this any further for now. Danny, can you please
try to see if you can find an Open Type font for Hebrew and test it with the
MapServer binary that you got? (Then please report your findings to this bug).

comment:4 Changed 16 years ago by dannys@…

Weel, I have tried two OpenType fonts Cardo and SIL Hebrew font.
All I did is used them in a regular way in with MapServer with few different 
encodings, (HEBREW,ISO-8859-8, ..) I've also tried few Unicode encodings...
In Unicode encodings I get strange characters, in Hebrew encoding I get good 
character but backwards, like before.
I actually didn't realized why OpenFont is different than any other TT font in 
MapServer, is it some new way I can use OpenFont in MapServer to get new 
results (reversed text)? 
Anyway, thank you Daniel for your care :)

comment:5 Changed 16 years ago by dmorissette

Cc: dannys@… added
Milestone: FUTURE
Danny Stopel (Anywhere Ltd) wrote:
> I succeeded to show Hebrew by reversing the characters of the string in 
> my database.
> So, the problem of Hebrew is solved, at least for me.

Setting target milestone to FUTURE... we may revisit this in a future version.

Note that we can't do anything without some good way to test. It would be great
if Danny (or anyone) could attach to this bug a sample mapfile + data + fonts
and some screenshots showing the expected result.

comment:6 Changed 15 years ago by eshabtai@…

Is there any updates on this bug?

It seems that Hebrew text is still displayed in the wrong direction.

comment:7 Changed 15 years ago by eshabtai@…

Cc: eshabtai@… added

comment:8 Changed 15 years ago by dmorissette

No developments yet, and can't really work on this until someone attaches sample
mapfile + data + fonts and some screenshots showing the expected result

Changed 15 years ago by eshabtai@…

Attachment: mapserver_bidi.patch added

Quick fix for bidi support

comment:9 Changed 15 years ago by eshabtai@…

I will upload some hello world example whith some Hebrew text so you can play
with (as soon as I can).

Changed 14 years ago by eshabtai@…

Attachment: added

A simple map file which displays Hebrew text

Changed 14 years ago by eshabtai@…

Attachment: DavidCLM-Bold.pfa added

An hebrew font from

Changed 14 years ago by eshabtai@…

Attachment: fontset.txt added

fontset file required for the map file

Changed 14 years ago by eshabtai@…

Attachment: correct.gif added

The expected output (correct output).

comment:10 Changed 14 years ago by eshabtai@…

I have uploaded all the required files to generate a simple Hebrew text.
correct.gif shows how the text should appear. Currently mapserver renders the
text in the wrong direction. When applying the patch I attached to mapserver it
will render the text correctly.

I'll be happy to wrap this one myself, but I need some review on the code I added.

comment:11 Changed 12 years ago by dmorissette

Description: modified (diff)
Milestone: FUTURE5.2 release
Owner: changed from mapserverbugs to dmorissette
Status: assignednew

Let's try to get this one done in 5.2

Note: See TracTickets for help on using tickets.