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
Back to
Seekers of Perl Wisdom