Both boxes should render the same:

fooאbar

fooבאbar

fooגבאbar

fooדגבאbar

fooאbar

fooאבbar

fooאבגbar

fooאבגדbar