A
A
artyvr2014-04-03 19:24:28
bash
artyvr, 2014-04-03 19:24:28

How to pass get request to bash script from html form?

There is a bash script, a get-request is sent to it from the html form and everything would be fine, but there is a problem with the Cyrillic alphabet - the text is transmitted in the form % D1% 80% D1% 83 (as I understand it - an escape sequence) and naturally this script this set does not perceive as it should. I used it in php $f = iconv('UTF-8', 'windows-1251', $_GET['f']);(thanks to habrahabr.ru ).
How to overcome this in bash so that the argument to the script is passed exactly srch=text and not srch=%D1%82%D0%B5%D0%BA%D1%81%D1%82 or maybe there is a way to translate the escape sequence into text already inside the script?
Thank you in advance...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
A_Gura, 2014-04-04
@artyvr

Nothing prevents from calling a Perl, Python or PHP script from a bash script, which will perform URL encoding\decoding.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question