> Hello,
> 
> I'm writing a unit test to simulate behavior of different browsers
> regarding multipart file upload where the filenames may contain letters
> with accents.  The server has noticed that some browsers (such as Chrome)
> use composed accents (a single character code point with the character and
> accent, for example "é") and others (such as Firefox) use combining
> diacriticals ("e" + \u0301).
> 
> I'm having difficulty simulating this with HTTP client, because when the
> actual HTTP multipart entity is sent to the server, the filenames of each
> part are encoded in ASCII.  It seems likely that I need to set the charset
> somewhere, but I don't see where.  Obviously, I set the content-type for
> the entity (such as "application/octet-stream", which has no character set,
> or perhaps a user-supplied text file in some arbitrary encoding, which may
> differ from one part to another), but surely, the character encoding (for
> text files) is unrelated to the character encoding of filenames?
> 
> Below is the relevant part of the test code (I hope it's readable, it's the
> ByteArrayBody constructor which seems to be the issue), followed by the
> HTTP wire log.

Hi Christopher,

maybe this will help you: http://stackoverflow.com/q/93551/696632 and 
http://greenbytes.de/tech/tc2231/.

Always keep in mind that HTTP headers are always encoded with ISO-8859-1 as per 
RFC.

Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to