Hebrew font in psychtoolobox ver 3

Hi all,

I'm trying to write Hebrew words on screen using the function 'DrawText'. Unfortunately, instead of Hebrew letters I'm getting some unidentified characters like ä or æ.

Note that when writing the words using standard commands (e.g a = 'hello'), the output is ok.

I've tried changing the font using 'TextFont', for example to 'Times New Roman (Hebrew)', but that didn't work. I also tried to change the encoding, but that didn't seem to help either.

I'm using Matlab 2009b and psychtoolbox version 3.0.8.

What could be the problem?

Any help would be greatly appreciated.

Thanks.
See DrawHighQualityUnicodeTextDemo.m, but as a starter, try if replacing a with double(a), ie., casting your text string to a double vector, helps. Double vectors are interpreted as encoded in unicode.

e.g.,

hebrewtest = [1488:1514];

should produce a sequence of some hebrew letters. If not, then something is wrong with the selected font / the font doesn't support unicode encoded hebrew.

What did you try with the encoding and why didn't it work? In any case the double() cast is less elegant, but often more robust, as it avoids any funny interactions between Matlab's/Octave's encoding settings and operating system encoding settings.

-mario

--- In psychtoolbox@yahoogroups.com, "SG" <sh_grt@...> wrote:
>
> Hi all,
>
> I'm trying to write Hebrew words on screen using the function 'DrawText'. Unfortunately, instead of Hebrew letters I'm getting some unidentified characters like ä or æ.
>
> Note that when writing the words using standard commands (e.g a = 'hello'), the output is ok.
>
> I've tried changing the font using 'TextFont', for example to 'Times New Roman (Hebrew)', but that didn't work. I also tried to change the encoding, but that didn't seem to help either.
>
> I'm using Matlab 2009b and psychtoolbox version 3.0.8.
>
> What could be the problem?
>
> Any help would be greatly appreciated.
>
> Thanks.
>