[RCD] Charset declaration and display of text attachments

Michael Heydekamp listuser at freexp.de
Sun Mar 24 22:44:23 CET 2013

Am 24.03.2013 22:01, schrieb Michael Heydekamp:

> Currently only the UTF-8 version will be displayed correctly. I'm not sure
> about how to deal with the Unicode version, but at least the plain text
> version is definitely lacking of a correct charset declaration (or better,
> of a charset declaration at all).
> As this charset can't be detected or known by any other than the user who is
> attaching the text file, I suggest that there should be a facility to select
> the appropriate charset - sometimes...
> But apart from that, I'm wondering which charset Roundcube is using at all
> when displaying the plain text file...? It is apparently not the local 8bit
> charset of my system (Windows-1252), as it should then being displayed this
> way:
>> ³ DOS Codepage 437 ³
> But see yourself what the output is (image attached as well)...

Looking at the HTML source of RC's output, it appears that RC is using UTF-8
no matter what when displaying text files (unless the charset is declared,
this needs still to be tested).

As UTF-8 can be safely detected (i.e. if the file is validly UTF-8 encoded
or not), this isn't a good idea for text files in a plain 8bit charset.

Nonetheless, even then Roundcube (or any other MUA) can't display the file
correctly if it doesn't know the charset (as not being declared). But using
the local 8bit charset would in case of no valid UTF-8 encoding IMO still be
better than blindly using UTF-8.

Michael Heydekamp
Co-Admin freexp.de

More information about the dev mailing list