I got confused using rpl in 20.04, thanks to this page it is clarified. What was the reason changing to a different source? Using -R option in the original package was more reliable. SF.net version did not have issues while the Ubuntu version did.
rpl: Simulating replacement of "$form->ACTION = $conf['paths']['http'] . $_SERVER['REQUEST_URI']" with "$form->ACTION = comHttpProtocolUrl( $conf['paths']['serverName'] . $_SERVER['REQUEST_URI'] )" (case sensitive; partial words matched)
rpl: The files listed below would be modified in a replace operation
rpl: could not guess encoding; using locale default 'UTF-8'
...
Traceback (most recent call last):
File "/usr/bin/rpl", line 377, in <module>
matches = replace(f, o, regex, old_str, new_str, encoding)
File "/usr/bin/rpl", line 178, in replace
parts = regex.split(tonext + block)
TypeError: can only concatenate str (not "bytes") to str
I got confused using rpl in 20.04, thanks to this page it is clarified. What was the reason changing to a different source? Using -R option in the original package was more reliable. SF.net version did not have issues while the Ubuntu version did.
aa0001@ test:~/ projects/ biospectra/ cvs$ find . -name '*.php' | xargs rpl -s "\$form->ACTION = \$conf[ 'paths' ]['http' ] . \$_SERVER[ 'REQUEST_ URI']" "\$form->ACTION = comHttpProtocolUrl( \$conf[ 'paths' ]['serverName' ] . \$_SERVER[ 'REQUEST_ URI'] )"
rpl: Simulating replacement of "$form->ACTION = $conf[' paths'] ['http' ] . $_SERVER[ 'REQUEST_ URI']" with "$form->ACTION = comHttpProtocolUrl( $conf[' paths'] ['serverName' ] . $_SERVER[ 'REQUEST_ URI'] )" (case sensitive; partial words matched)
rpl: The files listed below would be modified in a replace operation
rpl: could not guess encoding; using locale default 'UTF-8'
...
Traceback (most recent call last):
File "/usr/bin/rpl", line 377, in <module>
matches = replace(f, o, regex, old_str, new_str, encoding)
File "/usr/bin/rpl", line 178, in replace
parts = regex.split(tonext + block)
TypeError: can only concatenate str (not "bytes") to str