Re: Suggestions to better ship Perl on OS X.

2005-02-17 Thread Sherm Pendley
On Feb 17, 2005, at 8:31 AM, Richard Cook wrote:
Going through old list mail and found this one ... don't know if it's 
still relevant, but ... I have identical OS X 10.3.8 installs on two 
different machines ... identical that is except one has Xcode 
Developer Tools installed on it, and the other doesn't.

perldoc -f will not work on the Xcode-less machine, and contrary to 
what is said below, I don't see perlfunc.pod anywhere on the Xcode 
machine (where perldoc -f works).
perlfunc.pod is installed as part of the Developer Docs sub-package in 
Xcode. It's installed to:

/System/Library/Perl/5.8.1/pods/perlfunc.pod
sherm--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org


Re: Suggestions to better ship Perl on OS X.

2005-02-17 Thread Richard Cook
On Feb 17, 2005, at 5:57 AM, Sherm Pendley wrote:
On Feb 17, 2005, at 8:31 AM, Richard Cook wrote:
Going through old list mail and found this one ... don't know if it's 
still relevant, but ... I have identical OS X 10.3.8 installs on 
two different machines ... identical that is except one has Xcode 
Developer Tools installed on it, and the other doesn't.

perldoc -f will not work on the Xcode-less machine, and contrary to 
what is said below, I don't see perlfunc.pod anywhere on the Xcode 
machine (where perldoc -f works).
perlfunc.pod is installed as part of the Developer Docs sub-package in 
Xcode. It's installed to:

	/System/Library/Perl/5.8.1/pods/perlfunc.pod
Yes, you're right ... I suppose that Find in the Finder doesn't find it 
because /System is excluded from Find, unless you specifically choose 
it?

Anyway, I too wonder why perlfunc.pod is not part of the default 
install, if perldoc is. Probably this has been or will be fixed ...



James J Stadler/US/DNY is out of the office.

2005-02-17 Thread James . Stadler




I will be out of the office starting  02/17/2005 and will not return until
02/18/2005.

I will respond to your message when I return.

If you need a quicker response try the main office at 612-677-0758.

If this is urgent for me, contact me on my cell phone at 612-801-2396.

Jay Stadler
Minneapolis Center
RR Donnelley
v: 612-677-4361
f: 612-677-0762
[EMAIL PROTECTED]

Problem with Encoding

2005-02-17 Thread Philippe de Rochambeau
Hello,
I am trying to convert MacRoman encoded text to iso-8859-1. The script 
below show what I am trying to do.

The input file, data.txt contains the following string:
Les lphants sont arrivs. 
When I run the script, I get the following string, which is utf-8 and 
not iso-8859-1, in the data2.txt file:

Les lphants sont arrivs. 
I have tried adding the STDIN and STDOUT flags below, but to no avail. 
What am I doing wrong?

Furthermore, I keep getting a warning message about wide-characters, 
which makes sense, I think, because the output is UTF-8.

Many thanks.
Philippe
#!/bin/perl -w
use strict;
use encoding MacRoman; #, STDIN = MacRoman, STDOUT = iso-8859-1;
open FH, data.txt or die $!;
my $data = ;
while (FH) {
$data .= $_;
}
close FH;
open FH, data2.txt or die $!;
print FH $data;
close FH;


Re: Problem with Encoding

2005-02-17 Thread Sherm Pendley
On Feb 17, 2005, at 1:32 PM, Philippe de Rochambeau wrote:
use encoding MacRoman; #, STDIN = MacRoman, STDOUT = 
iso-8859-1;
You've specified STDOUT as 8859-1...
open FH, data2.txt or die $!;
print FH $data;
But you're not printing to STDOUT. Try opening FH like this:
open FH, ':encoding(iso-8859-1)', 'data2.txt' or die $!;
sherm--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org


Re: Problem with Encoding

2005-02-17 Thread John Delacour
At 7:32 pm +0100 17/2/05, Philippe de Rochambeau wrote:
I am trying to convert MacRoman encoded text to iso-8859-1. The 
script below show what I am trying to do.

The input file, data.txt contains the following string:
Les éléphants sont arrivés. EURO
First of all iso-8859-1 does not contain the Euro sign.  The 
character set you probably intend is Windows-1252, loosely termed 
Windows Latin 1 in OS X menus.  Unfortunately Perl has a pretty 
loose approach to charset names too, though when it says iso-8859-1 
it means it and not any extended version of it.

Try this.  It works here with Perl 5.8.6:
#!/usr/bin/perl -w
use encoding MacRoman, STDOUT = windows1252;
chdir $ENV{HOME}/temp/;
open  STDIN,   mac.txt or die $!;
open  STDOUT, windows1252.txt;
while (  ) {
  print;
}
JD