Triode Wrote: 
> OK I have a file.
> 
> Could a Hebrew reader have a look at the two attachments?
> 
> Unflipped is prior to flipping the reversed text, flipped is the result
> with flipping.
> 
> Does the flipped one look right?  The library puts the numbers at the
> right hand end if there are numeric characters prepended to the string
> - is this correct? [not that I can do anything about it!]

Yes, it looks great.  And yes, the number should be on the right. 
Thats the start of the string in hebrew.

Note that if you use Locale::Hebrew, it only works well for unicode
hebrew, whereas most tags are still ISO hebrew.  Therefore, I wrote my
own patch which handles both unicode hebrew and iso hebrew.  (Thanks
for the note about Locale::Hebrew - it solved my problem).  I'm not a
perl developer so my code probably sucks, but here it is anyway.  I put
it in Graphics.pm, at the beginning of String().  My code is between the
"Mack" comments.

<code>
sub string {
my $fontname = shift || return '';
my $string   = shift || return '';

# Mack
use Locale::Hebrew;
for my $ord (unpack('U*', $string)) {
# Convert ASCII Hebrew to Unicode Hebrew if required.
if ($ord > 223 && $ord < 251) {
require Encode;
$string = Encode::decode('iso-8859-8',
$string);
last;
}
}
$string = hebrewflip($string);
# /Mack

my $bits = '';
</code>

(Sorry about lack of indentation.  The forum seems to drop the tabs
upon submitting).

This code seems to produce correct results in all files I checked.  The
manual test for ASCII hebrew was added because Encode::decode crashed on
certain unicode strings.

Now, the only problem I failed to solve is the scrolling.  When a long
hebrew string needs scrolling, it should start by showing the rightmost
part of the string first, and scroll towards the leftmost part of the
string.  I can't find the part that controls scrolling.  Is it handled
by the firmware itself ?  Any way to change the scrolling behavior as
described here ?

Thanks,
Mack


-- 
mack
------------------------------------------------------------------------
mack's Profile: http://forums.slimdevices.com/member.php?userid=1849
View this thread: http://forums.slimdevices.com/showthread.php?t=19790

_______________________________________________
Discuss mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/discuss

Reply via email to