473,395 Members | 1,678 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

mailto with special character ...problem

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
4 37619
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Bal | last post by:
Hi, I am trying to generate a pdf using a XML file and rendering the page through XSL Stylesheet to a PDF. But the page has some special characters, as its for a chequ website. My Code below is...
2
by: Ozer | last post by:
Hi friends, I wanna ask something. I use javascript menu on my user interface. And the js files contains special(turkish) character. I need to use codepage=1254 attribute in my @Page tag. If i...
5
by: Sakharam Phapale | last post by:
Hi All, I am using an API function, which takes file path as an input. When file path contains special characters (@,#,$,%,&,^, etc), API function gives an error as "Unable to open input file"....
1
by: sonald | last post by:
Dear All, I am working on a module that validates the provided CSV data in a text format, which must be in a predefined format. We check for the : 1. Number of fields provided in the text file,...
10
by: Aray | last post by:
<!ENTITY % testEntity "(test)"> <!ELEMENT testElement %testEntity;> Above is a valid DTD file. But it doesn't work when I try to put a charater '/' in to the Content of testEntity. like...
2
by: thisisazam | last post by:
Hi I am picking records from xml file and saving them into mysql database. I am When I insert records, the special characters like ö,å,ä are being transformed into some unwanted values. I tried to...
1
by: Ragavendran | last post by:
Hi, I am using this method for search: Query =org.apache.lucene.queryParser.QueryParser.parse(String arg0) throws ParseException Hits = org.apache.lucene.search.Searcher.search(Query query,...
1
by: bdparnes | last post by:
I have a project where it is necessary to copy rows (and change a few pieces of information); however some of the rows may contain special characters such as an apostrophie or quotes. I am using the...
6
vekipeki
by: vekipeki | last post by:
I am having a problem with basic drawing of unicode characters in Windows 2000 and XP. I have written a simplest possible C# WinForms program to test it (just create a new Windows Forms C#...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.