* Jakson A. Aquino <[EMAIL PROTECTED]> [2006-06-20 14:34]:

> If my guess is correct the problem happens when gawk is called in a
> locale and the files "conjugue" and "verbos" were encoded in a
> different locale.

I found the source of the problem: I was doing the tests in a system with
gawk 3.1.4.  When I did it in my up-to-date unstable chroot with gawk
3.1.5, I could replicate what you reported.

I am now about to do the following for the package brazilian-conjugate:

  * Install the original conjuge script into /usr/bin/conjugue-ISO-8859-1.
  * Create /usr/bin/conjugue-UTF-8 with the recode command as you
    suggested.
  * Create the appropriate /usr/lib/brazilian-conjugate/verbos-<char-enc>
    files and change the content fo /usr/bin/conjugue-<char-enc>
    accordingly.
  * Create a simple wrapper script /usr/bin/conjugue that would call the
    appropriate /usr/bin/conjugue-<char-enc> according to the current
    locale, something like the following:
  
    #!/usr/bin/perl -w
    my $encoding = "ISO-8859-1";   # default value
    $ENV{LANG} =~ /[a-z]{2}?(?:(?:_[A-Z]{2}?)?(?:\.(.*))?)?/;
    $encoding = $1 if defined $1;
    system ("/usr/bin/conjugue-$encoding", @ARGV)
    
Notice that the script above relies on the environment variable LANG.  Do
you think that this would be okay?

-- 
Rafael


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to