ultranerds has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I'm working on a perl script to insert records into a Solr (lucine) install. However, for some of the records I'm getting an error about a "code 27"
Request error : 400 Illegal character CTRLCHAR code 27 at rowcol unknownsource 1778 at /home/user/domain.com/www/admin/Plugins/Solr/Users/Update.pm line 164.
I've done a little searching on google, and it seems like a "code 27" is the "excape" charachter.
Is there a simple way of filtering out these "control" charachters, so this doesn't even happen again?
At the moment, I'm doing it with a regex + tr{}
...but thats obviously not filtering out those "special charachters" :(
Any suggestions are much appreciated :)
TIA
Andy
I'm working on a perl script to insert records into a Solr (lucine) install. However, for some of the records I'm getting an error about a "code 27"
Request error : 400 Illegal character CTRLCHAR code 27 at rowcol unknownsource 1778 at /home/user/domain.com/www/admin/Plugins/Solr/Users/Update.pm line 164.
I've done a little searching on google, and it seems like a "code 27" is the "excape" charachter.
Is there a simple way of filtering out these "control" charachters, so this doesn't even happen again?
At the moment, I'm doing it with a regex + tr{}
$user->{$col} =~ s/\n+/\./sig;; $user->{$col} =~ tr{&[]ÀÂÄàâäÇçÉÊÈËéêèëÏÌÎïìîÖÔÒöôòÜÛÙüûùA-Z?! +;,.«»()" '}{ aaaaaacceeeeeeeeiiiiiioooooouuuuuua-z __};
...but thats obviously not filtering out those "special charachters" :(
Any suggestions are much appreciated :)
TIA
Andy
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Illegal character CTRLCHAR code 27
by moritz (Cardinal) on May 03, 2010 at 09:14 UTC | |
by ultranerds (Hermit) on May 03, 2010 at 09:19 UTC | |
by moritz (Cardinal) on May 03, 2010 at 09:26 UTC | |
by ultranerds (Hermit) on May 03, 2010 at 09:32 UTC | |
by FunkyMonk (Chancellor) on May 03, 2010 at 09:36 UTC | |
| |
Re: Illegal character CTRLCHAR code 27
by CountZero (Bishop) on May 03, 2010 at 13:28 UTC |
Back to
Seekers of Perl Wisdom