support non-ascii unicode strings in _get_all_query_args. Fixes: #2558

Fixes: #2558