Fw: [imp] ask help about imp decoding problem

Michael M Slusarz slusarz at bigworm.colorado.edu
Wed Apr 14 10:14:34 PDT 2004


Quoting Zhang Bo <boozhang at sdb.ac.cn>:

> This is most likely a missing "charset" attribute in the Content-Type:
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> headers, so it's not a fault of IMP.
> ^^^^^^^^^^^^^^^^^^^^^^^^^
>
> Yes, I think you are right.  But those emails display chinese correctly in
> my old webmail which built with horde2.0 and imp3.1. If they can not
> display chinese correctly in my new webmail which built with horde-HEAD
> and imp-4.0-ALPHA, the webmail upgrade would make nosense.

The problem is that IMP 3.x is *broken* with respect to charsets (or, 
at least,
not very smart about charset handling).

The correct behavior in the case you presented is to display the characters in
'us-ascii' encoding because, according to the RFCs, if a charset parameter is
not given in the Content-Type header, us-ascii MUST be used.  If this renders
the message unreadable, that is unfortunate.  However, this is because IMP is
working *correctly* - that messsage should *NOT* be readable in Chinese if
missing that charset parameter.

The old versions of IMP would simply print the content of the message without
any regard to what charset the user was using.  In your case, you most likely
are using a Chinese browser with a Chinese charset so the data 
outputted to the
screen was interpreted by the browser as chinese characters and they were
displayed to you that way.  This is not the correct behavior (for 
example, if I
view those characters on my English browser, they come through as 
garbage).  It
just happens to be that the character set of the message and the character set
of your browser happen to be the same.  So IMP 3.1 got "lucky" in this case -
but that still doesn't make it correct behavior.


michael

______________________________________________
Michael Slusarz [slusarz at bigworm.colorado.edu]
The University of Colorado at Boulder


More information about the imp mailing list