Re: Japanese + Encode::Guess

2003-06-25 Thread Robin
Thanks for your help Dan, but I'm mo further forward, the answer is 
apparently 'ascii', which is puzzling, because but the content is not 
ASCII - it is still legible in a web browser as it was written 
originally so the data is still intact.

I'm guessing that Encode::Guess tests the beginning of the file to see 
what it contains, which being a HTML doc would have characters within 
the ASCII range?



On Wednesday, June 25, 2003, at 02:04  am, Dan Kogai wrote:

print $enc-name;



DBI /SQL Server question []

2003-06-25 Thread allan juul
hi 

rather OT i gather but maybe its a general case on all platforms/dbs

i have an annoying problem with sql server, maybe someone have encountered 
something similar - it concerns special (danish) characters that im unable to 
insert correctly in the db table (they seem to be escaped with an even stranger 
char in the db)

if i print the words that i want to insert to a txtfile i can see that they are 
correct at that point


this works:
--
my $word = 'hardcoded with special chars: æøå';
my $sql = insert into $table (word) values (?);
my $sth = $dbh-prepare( $sql );
$sth-execute($word);


this doesn't work:
-
foreach my $word (keys %hash) {
my $sql = insert into $table (word) values (?);
my $sth = $dbh-prepare( $sql );
$sth-execute($word);
print OUT $sql ($word)\n; # looks correct
}







Re: Japanese + Encode::Guess

2003-06-25 Thread Joel Rees
 Thanks for your help Dan, but I'm mo further forward, the answer is 
 apparently 'ascii', which is puzzling, because but the content is not 
 ASCII - it is still legible in a web browser as it was written 
 originally so the data is still intact.
 
 I'm guessing that Encode::Guess tests the beginning of the file to see 
 what it contains, which being a HTML doc would have characters within 
 the ASCII range?

Thus, UTF-8, shift-JIS, or euc-JIS? 

Even 7-bit JIS apparently tends to be mixed with ASCII, so if your first
n characters are nothing but ASCII, the guess is ASCII? 

Is there a parameter to force the sample length?

(For five brief seconds, I was thinking about the value of randomizing
the starting point for samples. :*/ )

 On Wednesday, June 25, 2003, at 02:04  am, Dan Kogai wrote:
 
  print $enc-name;

And it was a good thing he responded, because I was going to take a
closer look at this tomorrow. (Thanks, Dan!)

-- 
Joel Rees, programmer, Kansai Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp



[CamelBones] addressing a check box

2003-06-25 Thread Yvon Thoraval
hey all,

i have a checkbox named saying myCB,

when i used CamelBones with Perl 5.6 reading this check box by :

my $okHTML = $self-{'myCB'}-stringValue;

returns 0 or 1 depending upon 'm y CB' state.

this was OK for me.

BUT since i've rebuild CamelBones with Perl 5.8 (DarwinPorts version)

doing the same thing gives en error :

Perl error: Can't call method stringValue without a package or object 
reference

instead of previously, if i does a :

$self-{'myCB'} = 0 or 1

and reading it afterwards, gives the correct 0 or 1 without the check 
box being checked...

In case someone could give me some light upon that...

Yvon

List archives AWOL?

2003-06-25 Thread Ken Williams
Hey,

The archives for this list at 
http://archive.develooper.com/macosx%40perl.org/ seem to have gone on a 
lunch break - anyone know what happened?

 -Ken



Re: Another shell/GUI cooperation script

2003-06-25 Thread Ken Williams
On Wednesday, March 26, 2003, at 02:17  PM, Ken Williams wrote:

Hey,

I've saved the following script as ~/bin/attach .  It lets me create a  
new Mail message from the command line with a given file as an  
attachment.  For example:

 % attach foo/bar/baz.doc
I was talking offline (well, online but not on *this* line =) with  
Chris Nandor, and he gave me some hints on how to find a solution for a  
problem I'd been having.  Whenever I executed applescript calls, I got  
the error:

## Component Manager: attempting to find symbols in a component alias  
of type (regR/carP/x!bt)

This even happened with 'osascript -e 1' at the command line, so it  
wasn't a perl-related problem, as it turned out.  The solution is here:

  http://www.macosxhints.com/article.php?story=20021211054158940

I moved /Library/QuickTime/Toast\ Video\ CD\ Support.qtx to /tmp/ and  
the error message went away.  Dunno if I'll miss it, but I rarely use  
Toast anymore and I certainly don't make video CDs.

(The original thread for this message is here:
http://groups.google.com/groups?hl=enlr=ie=UTF- 
8th=733e513bace2274arnum=1 )

 -Ken



Re: List archives AWOL?

2003-06-25 Thread Dan Sugalski
At 12:25 PM -0500 6/25/03, Ken Williams wrote:
Hey,

The archives for this list at 
http://archive.develooper.com/macosx%40perl.org/ seem to have gone 
on a lunch break - anyone know what happened?
onion, which hosts the archives, filled up one of its vital 
partitions a while ago and it messed up the archiving processes for 
most of the lists on it. A polite nudge to Ask, if he's not already 
read this, is probably in order. (And he's a guy, along with Robert 
Spier, I owe quite a few beers to... :)
--
Dan

--it's like this---
Dan Sugalski  even samurai
[EMAIL PROTECTED] have teddy bears and even
  teddy bears get drunk


Re: Panther Preview

2003-06-25 Thread Matthew Diephouse
Matthew Diephouse wrote:
Has anyone heard what version of perl is included in the Panther 
developer's preview?

m:att d:iephouse

This from a machine running panther:

[mac:~] nosaj56% perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 1) configuration:
  Platform:
osname=darwin, osvers=7.0, archname=darwin-thread-multi-2level
uname='darwin hampsten 7.0 darwin kernel version 6.0: thu jun 5 
16:43:03 pdt 2003; root:xnu-344.hope.rootsxnu-344.hope~objrelease_ppc 
power macintosh powerpc '
config_args='-ds -e -Dprefix=/usr -Dccflags=-g  -pipe 
-Dldflags=-Dman3ext=3pm -Duseithreads'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define 
usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
  Compiler:
cc='cc', ccflags ='-g -pipe -pipe -fno-common -no-cpp-precomp 
-fno-strict-aliasing',
optimize='-Os',
cppflags='-no-cpp-precomp -g -pipe -pipe -fno-common 
-no-cpp-precomp -fno-strict-aliasing'
ccversion='', gccversion='3.1 20021003 (prerelease)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', 
lseeksize=8
alignbytes=8, prototype=define
  Linker and Libraries:
ld='MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags ='-L/usr/local/lib'
libpth=/usr/local/lib /usr/lib
libs=-ldbm -lm -lc
perllibs=-lm -lc
libc=/usr/lib/libc.dylib, so=dylib, useshrplib=true, 
libperl=libperl.dylib
gnulibc_version=''
  Dynamic Linking:
dlsrc=dl_dyld.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags='-bundle -undefined dynamic_lookup 
-L/usr/local/lib'

Characteristics of this binary (from libperl):
  Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES 
PERL_IMPLICIT_CONTEXT
  Locally applied patches:
MAINT19524
  Built under darwin
  Compiled at Jun  6 2003 11:42:35
  @INC:
/System/Library/Perl/5.8.1/darwin-thread-multi-2level
/System/Library/Perl/5.8.1
/Library/Perl/5.8.1/darwin-thread-multi-2level
/Library/Perl/5.8.1
/Library/Perl
/Network/Library/Perl/5.8.1/darwin-thread-multi-2level
/Network/Library/Perl/5.8.1
/Network/Library/Perl
.



Perl in Panther

2003-06-25 Thread Geoffrey F. Green
For those of you wondering about the details of the Perl included in the
Panther dev. release, and whose curiousity is piqued by Matthew Diephouse's
perl -v report, I point you to:

http://www.opensource.apple.com/darwinsource/7.0b1/index.html

and, more particularly,

http://www.opensource.apple.com/darwinsource/7.0b1/perl

Haven't looked through them myself closely, but they at least purport to be
the source code of the version of Darwin included in the Panther dev.
release.  See also http://developer.apple.com/darwin/

 - geoff