#!/usr/local/bin/python3

import binascii
from flask import Flask
app = Flask(__name__)

@app.route('/<path:p>')
def hello(p):
    return binascii.b2a_qp(p.encode('utf-8')).decode('utf-8') + "\n"

if __name__ == "__main__":
    app.run()


curl http://localhost:5000/%90%90

=EF=BF=BD=EF=BF=BD



as I understand Werkzeug decode variable 'p' with help of 

decode('utf-8', 'replace')


can we re-implement it to


decode('utf-8', 'surrogateescape')


to preserve more information 

?


as I understand Werkzeug decode variable 'p' with help of 


decode('utf-8', 'replace')


can we re-implement it to


decode('utf-8', 'surrogate escape')


to preserve more information 

?


-- 
You received this message because you are subscribed to the Google Groups 
"pocoo-libs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pocoo-libs+unsubscr...@googlegroups.com.
To post to this group, send email to pocoo-libs@googlegroups.com.
Visit this group at https://groups.google.com/group/pocoo-libs.
For more options, visit https://groups.google.com/d/optout.

Reply via email to