How to preserve UTF8 string from app to webserver in Python
HTTP headers are strictly 7-bit US ASCII. The RFC allows you to accept ISO8859-1as a compatibility hack, but don't send any byte beyond 127.
There is no standard or best way to send any other data type beside ASCII in the headers. It is your application's responsibility to encode arbitrary sequences of bytes (and your UTF string is an arbitrary sequence of bytes) such that the encoding is 7-bit safe.
Use whatever is most convenient for both client and server in their implementation language(s). Base64 encoding, \hh byte escapes, \uhhhh unicofe character escapes, %hh as per URL encoding, =HH as in MIME, or &#... entities. All of these methods exist and are being used in the wild.
I have an app that submit a request to a Python webserver. The app has a UTF8 string with the following contents:

la langue franþaise.ppt

This is put into a HTTP header, and somehow converted as such:

la langue fran\xfeaise.ppt

Then Python on the web-server tried to do something with the string that maybe expects it to be UTF8, and I get this error:

UnicodeDecodeError: 'utf8' codec can't decode byte 0xfe in position 14: invalid start byte

I would basically like to preserve this UTF8 from the app to the web-server, such that the variable would contain the following if I printed it:

la langue franþaise.ppt

What's the best way to preserve a UTF8 string from a web client and server (assuming both written in Python)?