Re: RFC 50 (v1) BiDirectional Support in PERL

2000-08-08 Thread Roman M . Parparov

On Tue, Aug 08, 2000 at 07:11:33AM -0400, Bryan C. Warnock wrote:
> On Tue, 08 Aug 2000, Roman M . Parparov wrote:
> 
> To explain for those who haven't handled a RTL language, numbers look
> the same as in LTR for most RTL languages, and I believe numerical
> prefixes also appear the same.
> 
Yes, the numbers representation including the minus, the comma, the
dot and the per cent are written in the regular order.

> The number is 1,358.
> 
> alrqm ?w 1,358.
> 
> Or, to compensate for a LTR display,
> 
> .1,358 w? mqrla
> 
> Also, 
> 
> .-1,358% w? roala mqrla
> 
> I've never done anything but the simplest math in Arabic, so I don't
> know if evaluation order is reversed.
> 
> x = 4 / 8;
> 
> 1/2?  Or 2?

This is a tough one. But it is known that the numerical game scores and
likewise are being written RTL. As for math, I've seen it being written
both ways. I am not a native hebrew speaker and I consulted some natives
at work and no consensus was reached. It means some expanded and very 
precise spec should be written on how a pure RTL and RTL with portions of 
LTR have to look like.

Besides, speaking of Arabic, they do have even their own digits, but then,
I think they behave just like letters.

> Perhaps a sub-list to hash out how we can do this without bloating Perl
> too much?
> 
I think not at this stage. We need to decide how important this is for
PERL and after we're done with ths more or less general stage, 
we'll roll out the Specs and then it'd be possible to start coding.

Currently, an item for the discussion IMHO is - whether to empower 
existing print to handle visual RTL output, whether to write a core 
output function rtlprint, or to reduce ourselves to a Text:: module?
I.e. - WHAT are we going to do, but not yet - HOW.

> -- 
> Bryan C. Warnock
> ([EMAIL PROTECTED])

-- 
Roman M. Parparov - NASA EOSDIS project node at TAU technical manager.
Email: [EMAIL PROTECTED]   http://www.komkon.org/~romm
Phone/Fax: +972-(0)3-6405205 (work), +972-(0)54-629-884 (home)
--
The economy depends about as much on economists as the weather does on
weather forecasters.
-- Jean-Paul Kauffmann



Re: RFC 50 (v1) BiDirectional Support in PERL

2000-08-08 Thread Roman M . Parparov

On Mon, Aug 07, 2000 at 11:51:06PM +0200, Bart Lateur wrote:
> On 07 Aug 2000 17:27:55 -0400, Chaim Frenkel wrote:
> 
> >He mentioned two different encodings. Logical and Visual. I'm not clear
> >which is which. One orders the characters so that the first char is
> >first. The other reorders the characters to correctly display on a
> >device that can not understand rtl text.
> 
Logical is the one to display first as first.
The idea is to support directly visual outputs, thus only requiring
from a device to support the output font.

> It's just that, in his application area, CGI, that the browser just
> might display it as RtL regardless of what he expected.
> 
It's not only the browser in the end.
It'd expand the capabilities to any output device presumed LTR.

> It sounds like a hack. Should Perl support such hacks in the core?
> 
> Is this sofisticated enough, or do we need something more low-level?
> 
>   $ltr = join '', reverse split /($sequence|.)/, $rtl;
> 
It won't work with a mixed text, and there the pain in the ass begins.
Numbers, Latin char strings, here we go.

This is what Hebrew ViM did, and it is not easy to work with EVERYTHING
going from right to left.

The problem was big enough for that ECMA document to appear.

> -- 
>   Bart.

-- 
Roman M. Parparov - NASA EOSDIS project node at TAU technical manager.
Email: [EMAIL PROTECTED]   http://www.komkon.org/~romm
Phone/Fax: +972-(0)3-6405205 (work), +972-(0)54-629-884 (home)
--
The economy depends about as much on economists as the weather does on
weather forecasters.
-- Jean-Paul Kauffmann



Re: RFC 50 (v1) BiDirectional Support in PERL

2000-08-07 Thread Roman M . Parparov

On Sun, Aug 06, 2000 at 09:36:12PM -0400, Ken Fox wrote:
> Perl6 RFC Librarian wrote:
> > BiDirectional Support in PERL
> 
> I know nothing about bi-directional output. It doesn't seem
> like Perl has any assumption of left-to-right at all. What's
> the difference between right-to-left support in Perl and just
> editing/using Perl in an xterm that does right-to-left?
> 
> - Ken

The main application of this is going to be CGI field, for the people
who fill and submit forms containing RTL language and expects to receive
the RTL output.

I wrote a WWW mail program with hebrew support once. Pain in the ass to
invent and reinvent functions for printing Hebrew correctly. Moreover, a
lot of self-written reversing and replacing reduces the performance from
what it would be if we just had it implemented in the core of Perl.

-- 
Roman M. Parparov - NASA EOSDIS project node at TAU technical manager.
Email: [EMAIL PROTECTED]   http://www.komkon.org/~romm
Phone/Fax: +972-(0)3-6405205 (work), +972-(0)54-629-884 (home)
--
The economy depends about as much on economists as the weather does on
weather forecasters.
-- Jean-Paul Kauffmann



Re: BiDirectional Support in Perl6

2000-08-03 Thread Roman M . Parparov

On Thu, Aug 03, 2000 at 11:39:13PM +0900, Simon Cozens wrote:
> On Thu, Aug 03, 2000 at 02:31:01PM +0300, Roman M . Parparov wrote:
> > Is any core support for Bidirectional languages going to be implemented?
> 
> If I get my way, yes. I will be fighting for this.
> 
Well I guess here I may contribute most due to my experience 
(even implemented a WWW-based mailer with Hebrew support once).

I'll start thinking of an RFC. 

R




BiDirectional Support in Perl6

2000-08-03 Thread Roman M . Parparov

I have a question about Subj.

This is quite unexplored field. I, being an Israeli resident, am forced
to deal once in a while in applications that should output RTL languages,
both as plain text output and hypertext output. It is quite not a trivial
thing to do, and no language so far has some good support for it. The need
for such a support is very high, especially for Web applications.

Is any core support for Bidirectional languages going to be implemented?
Or, maybe I should take that question to the stdlib list?

-- 
Roman M. Parparov - NASA EOSDIS project node at TAU technical manager.
Email: [EMAIL PROTECTED]   http://www.komkon.org/~romm
Phone/Fax: +972-(0)3-6405205 (work), +972-(0)54-629-884 (home)
--
The economy depends about as much on economists as the weather does on
weather forecasters.
-- Jean-Paul Kauffmann