Avoiding charset corruption when sending patches
dank at kegel.com
Tue Aug 19 16:54:16 CDT 2008
Patches that touch non-Latin1 .rc files might need to be sent
as attached non-text files rather than inline or as .txt files,
to avoid charset corruption.
might suffer corruption (I can't tell offhand).
looks safe, though.
Patchwatcher was converting patches to utf-8,
causing the patch
[1/3] wined3d: Move creating a texture id from PreLoad to BindTexture
to not apply. Thanks to Henri Verbeet for diagnosing the problem.
The patchwatcher web page may need some surgery
to deal with this. Currently it uses a single .txt file for the
email message and the patch, which probably tempts
the web server and browser to do charset conversions.
I will probably switch the suffix to .bin to discourage this.
Even longer story:
So, what character set is the Wine source tree encoded with?
It looks like a mixture:
1. in general, .c and .h files are encoded in Latin-1 aka iso8859-1.
2. include/*.h are encoded in ASCII and are not allowed to have
non-ascii chars; see http://bugs.winehq.org/show_bug.cgi?id=5420
3. *_XX.rc (or XX.rc) are in the character set
that Windows defaults to for language XX,
unless changed by a #pragma code_page... in the .rc file.
Which brings us to the question:
since email clients love changing charsets of text messages,
how can we avoid corrupting patches when sending them via email?
It kind of looks like patches to .rc files
must be attached rather than inline, and should
be attached as .patch, .diff, or .bin files so they are
marked with the mime type application/octet-stream
which should inhibit all charset conversions.
(Attaching as .txt might tempt mail clients to perform
charset conversions on them.)
More information about the wine-devel