Re: Layers Issue in SVN::Notify

[email protected] (Nicholas Clark)
Newsgroups perl.unicode
Message-ID <[email protected]>
On Mon, Jul 10, 2006 at 11:57:52AM -0700, David Wheeler wrote:
> Greetings fellow Perlers,
> 
> I've had some complaints for a while now about non-ASCII characters  
> not properly showing up in emails sent by my SVN::Notify module. Last  
> week Éric Cholet figured out how to get it to work: He simply set the  
> LANG environment variable to fr_FR.ISO8859-1.
> 
> So the problem is the LANG environment variable. Setting it to 'C' in  
> a BEGIN block doesn't work, either. But my sense is that it shouldn't  
> make any difference what the environment is set to if I'm setting the  
> IO layer on the file handle. Here is the code for creating the handle  
> in SVN::Notify:

>         # Child process. Execute the commands.
>         exec @_ or die "Cannot exec $_[0]: $!\n";
>         # Not reached.
>     }
> }
> 
> I'm using binmode to set the IO layer on the pipe both for reading  
> and writing pipes, so I'd expect it to do the right thing vis-a-vis  
> the localization without regard to the LANG environment variable  
> (Éric had the io_layer attribute set to 'raw'). But obviously I'm  
> wrong. Is there something I'm missing about when and/or where the IO  
> layer should be set? Anyone run into something like this before?

I doubt that perl's at fault. What are you piping the data into, and
what does it think of $LANG in the environment?

Nicholas Clark
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.