Opened 9 years ago

Closed 5 years ago

#2946 closed defect (wontfix)

[general] rendering "(" and ")" incorrectly in text with both RTL and LTR character

Reported by: Hooman Mesgary Owned by: mapnik-team@…
Priority: major Milestone:
Component: mapnik Version:
Keywords: rtl ltr bidirection parentheses Cc:

Description

Search for Iran (country) in OSM and you can find its name in Persian (it is ایران) and you can see two parentheses are rendered incorrectly. They are swaped.
You can check this link also and find the name of the country in the middle:
http://www.openstreetmap.org/?lat=33&lon=52.9&zoom=5&layers=B000FTF

It is written as

)Iran( ایران

while it should be

(Iran) ایران

Change History (5)

comment:1 Changed 9 years ago by Tom Hughes

I suspect this is basically the same problem as #1515 which is also mapnik ticket 189 (http://trac.mapnik.org/ticket/189). The underlying issue is basically that mapnik processes the text one character at a time rather than as a single string.

comment:2 Changed 9 years ago by Hooman Mesgary

Summary: rendering "(" and ")" incorrectly in text with both rtl and ltr haracterrendering "(" and ")" incorrectly in text with both RTL and LTR character

I am not sure, may be you are right.
But I think this problem is happening because when it reaches to the first parenthesis, it doesn't switch between RTL and LTR as the next character is LTR and the last character (before space) is RTL.

comment:3 Changed 5 years ago by math1985

Summary: rendering "(" and ")" incorrectly in text with both RTL and LTR character[placenames] rendering "(" and ")" incorrectly in text with both RTL and LTR character

comment:4 Changed 5 years ago by math1985

Summary: [placenames] rendering "(" and ")" incorrectly in text with both RTL and LTR character[general] rendering "(" and ")" incorrectly in text with both RTL and LTR character

comment:5 Changed 5 years ago by math1985

Resolution: wontfix
Status: newclosed

We don't use brackets anymore for international names but the int_name tag instead, so I consider this fixed.

Note: See TracTickets for help on using tickets.