Opened 20 years ago

Last modified 16 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 http://www.maptools.org/dl/)
> I also succeeded to display Hebrew, but backwards :(
> Hebrew is a right to left language. I've tried all possible encodings
> from 
> http://www.gnu.org/software/libiconv/
> 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 by dmorissette, 20 years ago

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:
http://www.multilingual.com/FMPro?-db=archives&-format=ad%2fselected%5fresults.html&-lay=cgi&-sortfield=magazine%20number&-sortorder=descend&-op=eq&Ad%20Type=reprint&-max=1817529521&-recid=33256&-token=%5bFMP-currenttoken%5d&-find=

The Hebrew HOWTO:
http://www.ibiblio.org/mdw/HOWTO/Hebrew-HOWTO.html

IGLU FAQ (The Israeli Group of Linux Users)
http://iglu.org.il/faq/cache/8.html

comment:2 by dmorissette, 20 years ago

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:
http://freedesktop.org/Software/FriBidi

comment:3 by dmorissette, 20 years ago

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:
http://freetype.sourceforge.net/opentype/index.html

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 by dannys@…, 20 years ago

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 by dmorissette, 20 years ago

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 by eshabtai@…, 18 years ago

Is there any updates on this bug?

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

comment:7 by eshabtai@…, 18 years ago

Cc: eshabtai@… added

comment:8 by dmorissette, 18 years ago

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

by eshabtai@…, 18 years ago

Attachment: mapserver_bidi.patch added

Quick fix for bidi support

comment:9 by eshabtai@…, 18 years ago

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

by eshabtai@…, 18 years ago

Attachment: hebrew.map added

A simple map file which displays Hebrew text

by eshabtai@…, 18 years ago

Attachment: DavidCLM-Bold.pfa added

An hebrew font from http://culmus.sourceforge.net/

by eshabtai@…, 18 years ago

Attachment: fontset.txt added

fontset file required for the map file

by eshabtai@…, 18 years ago

Attachment: correct.gif added

The expected output (correct output).

comment:10 by eshabtai@…, 18 years ago

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 by dmorissette, 16 years ago

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.