ID: 13097
User updated by: [EMAIL PROTECTED]
Old Status: Feedback
Status: Open
Bug Type: IMAP related
Operating System: WinNT 4.0
PHP Version: 4.0.4pl1
New Comment:


I got the body of the file with imap_fetchbody (), then decoded it with 
imap_base64 and saved it in a file. I opened the new file with the 
Notepad and the original file as well. The text was exactly the same but 
these strange linebreaks. These linebreaks aren't chr (10) or chr (13) or 
something like that.  I wrote a script who reads the file and puts out 
every char in the file followed by his ASCII number and a linebreak and 
it put out something like that.



(Sorry, I don't have the correct ASCII numbers in my head)

So after the fourth char in this example there's a linebreak without an 
ASCII number, so I can't open the file. (of course I can open it, but the 
programm will put out an error message and nothing else).

This problem appears only with base64 decoding. I don't have troubles 
with the imap_qprint () function.

so long, Simon

(I can't bring you an original example produced by my script, because I 
get a "PHP has encountered an Access Violation at 0CC92466" message 
and our fucking computershop chief won't be there to restart it until 6)

Previous Comments:

[2001-09-02 16:41:25] [EMAIL PROTECTED]

Do you happen to read that file with fopen() / fread() ?
Can you attach a complete but short example script?



[2001-09-02 15:46:48] [EMAIL PROTECTED]

imap_base64 seems to produce strang linebreaks in a decoded string.
For example, I've a JPEG file to decode. The original file starts with the line

 JFIF  H H  jPhotoshop 3.0 8BIM      H     H    8BIM
        x8BIM             8BIM
        8BIM     H /ff  lff       /ff         2    Z         5    -   
     8BIM     p          
      8BIM          @  @    
8BIM        8BIM          W   p    s     JFIF  H H   &File 
written by Adobe Photoshop 5.0 Adobe d                        

  p W"   
   ? Gc㡘Ңۋk 

(sorry for this long stuff)
but the imap_base64 decoded string starts with 

 JFIF  H H  jPhotoshop 3.0 8BIM      H     H    8BIM
        x8BIM             8BIM

These linebreaks don't seem to have any ASCII number or something, they're just 


Edit this bug report at

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to