in reply to panic: swash_fetch on passing a string to lc

check out the code below,

:) That stuff doesn't compile :)

Well its utf8 related, see re + utf8 problem , Re: utf8 problem

Its probably fixed in http://search.cpan.org/dist/perl-5.8.9

  • Comment on Re: panic: swash_fetch on passing a string to lc

Replies are listed 'Best First'.
Re^2: panic: swash_fetch on passing a string to lc
by irishBatman (Novice) on Jul 26, 2012 at 10:56 UTC

    thanks, the pointer got me thinking, turns out I was loading from xml, where the encoding is utf-8, however I realised I could just convert these into utf8/latin1 perls internal data representation. Is that understanding correct?

    so when I use the following code things start working, if anyone has any other wisdom regarding exactly what is happening here that would be awesome.

    utf8::decode($newOpMode); print length($newOpMode) . " $newOpMode ---" . length ($self->setT +heOpMode) . " " . $self->setTheOpMode."\n"; $return = 1 if ( (lc( $newOpMode )) eq "mitigate" );

    http://perldoc.perl.org/utf8.html

    http://perldoc.perl.org/perlunifaq.html