[Tickets #12127] Re: utf-16 encoded text files MIME part header broken

noreply at bugs.horde.org noreply at bugs.horde.org
Tue Mar 19 14:10:10 UTC 2013


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/12127
------------------------------------------------------------------------------
  Ticket             | 12127
  Updated By         | vmkari at cc.helsinki.fi
  Summary            | utf-16 encoded text files MIME part header broken
  Queue              | IMP
  Version            | 6.0.4
  Type               | Bug
  State              | Feedback
  Priority           | 2. Medium
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


vmkari at cc.helsinki.fi (2013-03-19 14:10) wrote:

> IIRC, this is a known limitation with uploading text data in  
> browsers.  Browsers rarely (if ever?) insert charset information  
> into the Content-Type of the uploaded file.  So we pretty much have  
> to assume that the file being uploaded is the same charset as the  
> browser (which is assumed to be the same charset the underlying OS  
> is using).
>
> See, e.g.,  
> http://stackoverflow.com/questions/6459741/how-to-determine-if-uploaded-file-is-in-utf-8-or-utf-16
>
> BOM's could potentially be used to fix this some of the time.  But  
> there's no guarantee they will exist, or won't be stripped/munged by  
> some intermediate process.

Many thanks Michael for your prompt response, but unfortunately the  
reply misses the main point of the original bug report. Horde/IMP  
wrongly encodes the metadata about the UTF16-LE encoded text file  
attachment, i.e. the MIME headers describing the attachment then  
contain UTF16-LE. Those headers should never ever contain NUL bytes  
nor 8-bit data of any kind. That is the key problem. (This bug is not  
about the difficulties detecting the correct charset).






More information about the bugs mailing list