By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,087 Members | 1,508 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,087 IT Pros & Developers. It's quick & easy.

mailto with special character ...problem

P: n/a
Hi,

How do i add a hyperlink to a email id having special characters?
I tried the same , say mailto: te*********@hoohoo.com
IN the to box i can see only till test_ and the rest is omitted.

Any ideas how the tags could be bypassed?
Though i am not a web page designer, I tried & but with no luck.

Any help would be highly appreciated.

Best Regards
Krishna
Jul 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Krishna A.M <news:be**********@news1.wdf.sap-ag.de>:
How do i add a hyperlink to a email id having special
characters? I tried the same , say mailto:
te*********@hoohoo.com IN the to box i can see only till test_
and the rest is omitted.


Didn't realize the '&' could be used for an email username...I
would avoid it even when it is useable. Anyhow, if replacing with
&amp; doesn't work I suggest using a server-side powered form. That
way you don't have to depend on the client being configured to
handle a mailto:

--
Rob - http://rock13.com/
Web Stuff: http://rock13.com/webhelp/
Jul 20 '05 #2

P: n/a
In article <Xn***********************@24.48.107.53>, ro****@excite.com says...
Krishna A.M <news:be**********@news1.wdf.sap-ag.de>:
How do i add a hyperlink to a email id having special
characters? I tried the same , say mailto:
te*********@hoohoo.com IN the to box i can see only till test_
and the rest is omitted.


Didn't realize the '&' could be used for an email username...I
would avoid it even when it is useable. Anyhow, if replacing with
&amp; doesn't work I suggest using a server-side powered form. That
way you don't have to depend on the client being configured to
handle a mailto:

&amp; won't freaking work because it has ANOTHER & in it...DUH...

Use %36 type encoding instead.
Jul 20 '05 #3

P: n/a
Mr. Clean wrote:
&amp; won't freaking work because it has ANOTHER & in it...DUH...

Use %36 type encoding instead.


Actually, &amp; doesn't work because it's encoding the character at the
wrong layer of the different languages and protocols involved here.

This can get a bit confusing, but basically...

In URIs (the term URL is being deprecated in the newest Internet draft
on the subject in favor of URI), the ampersand is a reserved character,
used to separate parameters. (For instance, in a "mailto" URI, if you
have multiple parameters such as "subject" and "body", they're separated
by ampersands.) When you need an ampersand in a URI in any other
context, you're supposed to encode it as %26 (not %36, which is the
digit "6"). This "percent-sign" encoding is the standard method of
encoding characters in URIs to prevent them from being interpreted in
their reserved meanings.

In HTML, there are also some reserved characters which must be encoded
when used in other contexts, and one of them is the ampersand. The way
to encode it is as &amp;. You would do this, for instance, with any
ampersand within a URI which is being used in its URI-reserved meaning
(to separate parameters), and hence is not encoded as %26.

Here's a sample piece of HTML that uses both encoding forms properly:

<A HREF="mailto:th*********@example.net?subject=this& amp;body=that">

Not that I recommend using "subject" and "body" parameters in "mailto"
URIs, due to browser and mail client support problems, but the standards
do allow it.

--
== Dan ==
Dan's Mail Format Site: http://mailformat.dan.info/
Dan's Web Tips: http://webtips.dan.info/
Dan's Domain Site: http://domains.dan.info/

Jul 20 '05 #4

P: n/a
Hello Daniel,

One more friend of me suggested to use a java sctipt HTMLEncode to input the
email id.
But your suggestion to use %26 works !!!
This is much more simpler and eazy for me.

I got the following information as well from
http://www.douggreenconsulting.com/articles/htmlamp.asp for various reserved
characters.

0 1 2 3 4 5 6 7 8 9 A B C D E F
0 NUL SOH STX ETX EOT ENQ ACK BEL BS HT LF VT FF CR SO SI
1 DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC FS GS RS US
2 SP ! " # $ % & ' ( ) * + , - . /
3 0 1 2 3 4 5 6 7 8 9 : ; < = > ?
4 @ A B C D E F G H I J K L M N O
5 P Q R S T U V W X Y Z [ \ ] ^ _
6 ` a b c d e f g h i j k l m n o
7 p q r s t u v w x y z { | } ~ DEL

Thanks again for all your comments.

Best Regards
Krishna
PS: I am using IE 5.5/6.0 and mail client as Outlook 2K/XP


"Daniel R. Tobias" <da*@tobias.name> wrote in message
news:dK******************@news2.news.adelphia.net. ..
Mr. Clean wrote:
&amp; won't freaking work because it has ANOTHER & in it...DUH...

Use %36 type encoding instead.


Actually, &amp; doesn't work because it's encoding the character at the
wrong layer of the different languages and protocols involved here.

This can get a bit confusing, but basically...

In URIs (the term URL is being deprecated in the newest Internet draft
on the subject in favor of URI), the ampersand is a reserved character,
used to separate parameters. (For instance, in a "mailto" URI, if you
have multiple parameters such as "subject" and "body", they're separated
by ampersands.) When you need an ampersand in a URI in any other
context, you're supposed to encode it as %26 (not %36, which is the
digit "6"). This "percent-sign" encoding is the standard method of
encoding characters in URIs to prevent them from being interpreted in
their reserved meanings.

In HTML, there are also some reserved characters which must be encoded
when used in other contexts, and one of them is the ampersand. The way
to encode it is as &amp;. You would do this, for instance, with any
ampersand within a URI which is being used in its URI-reserved meaning
(to separate parameters), and hence is not encoded as %26.

Here's a sample piece of HTML that uses both encoding forms properly:

<A HREF="mailto:th*********@example.net?subject=this& amp;body=that">

Not that I recommend using "subject" and "body" parameters in "mailto"
URIs, due to browser and mail client support problems, but the standards
do allow it.

--
== Dan ==
Dan's Mail Format Site: http://mailformat.dan.info/
Dan's Web Tips: http://webtips.dan.info/
Dan's Domain Site: http://domains.dan.info/

Jul 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.