I write smtp client to send html email from my application.
Html normally is a doc saved as html format. If there are images then their tag have SRC coded on a way I can't find how it's done. On Example at end you can see html generated using OpenOffice 3.1. There is only one image and doc name is "Sin título 1.html" which is used to declare inserted images.
I don't know if this happen using MS-Word or other word processors.

<IMG SRC="Sin%20t%C3%ADtulo%201_html_m82e68f1.jpg" ....
image on disc is "Sin título 1_html_m82e68f1.jpg"
whitespace are replaced by %20
but í es replaced by %C3%AD but in utf-8 is %ED

Special characters are coded using 2 bytes and I need how to decode to access image to embed into email.
UrlDecode don't work as it returns "Ã-" (where this - is virtual dash)

I tested if page is show correctly on browsers and this is what I get for
1 - SRC="Sin%20t%C3%ADtulo%201_html_m82e68f1.jpg"
2 - SRC="Sin%20t%EDtulo%201_html_m82e68f1.jpg" (html file changed using Notepad++)
3 - SRC="Sin título 1_html_m82e68f1.jpg" (html file changed using Notepad++)

Firefox 3.6 and Google Chrome 4.1 show allways page correctly
IE 8.0 only 2 and 3 are showed correctly.

Most of my clients use IE.

I hope you can give any help.

kind regards


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
<META NAME="GENERATOR" CONTENT="OpenOffice.org 3.1  (Win32)">
<META NAME="CREATED" CONTENT="20100409;23505100">
<META NAME="CHANGED" CONTENT="20100410;22340500">
<STYLE TYPE="text/css">
        @page { margin: 2cm }
        P { margin-bottom: 0.21cm }
<P STYLE="margin-bottom: 0cm"><BR>
<P STYLE="margin-bottom: 0cm"><IMG SRC="Sin%20t%C3%ADtulo%201_html_m82e68f1.jpg" NAME="gráficos1" ALIGN=LEFT WIDTH=145 HEIGHT=61 BORDER=0><BR CLEAR=LEFT><BR>
<P STYLE="margin-bottom: 0cm"><BR>

Xavier Mor-Mur

To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to