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