473,385 Members | 1,185 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,385 software developers and data experts.

The image name is hi%20there.jpg

Some images I want to link to using the IMG element have a name such as hi%20there.jpg. If I try to do this:

<img src="hi%20there.jpg">

the image will not be found for the browser is going to expect its name to be

hi there.jpg

which it is not.
If the image has these "encodings" in the name how can I force the browser to use the name exactly as it is?
In other words do NOT encode %20 to space? Renaming is not an option. Thanks.

--
George Hester
__________________________________
Jul 23 '05 #1
7 2621
George Hester wrote:
Some images I want to link to using the IMG element have a name such
as hi%20there.jpg.

If the image has these "encodings" in the name how can I force the
browser to use the name exactly as it is? In other words do NOT
encode %20 to space? Renaming is not an option. Thanks.


Encode the % itself: hi%2520there.gif
Jul 23 '05 #2
George Hester wrote:
Some images I want to link to using the IMG element have
a name such as hi%20there.jpg.
Why do they have such odd names?
If I try to do this:

<img src="hi%20there.jpg">
Presumably you omitted the alt attribute for brevity.
the image will not be found for the browser is going to expect its name to be

hi there.jpg

which it is not.
If the image has these "encodings" in the name how can I force
the browser to use the name exactly as it is? In other words do
NOT encode %20 to space?
RFC2396 sec. 2.4.2 says:

| Because the percent "%" character always has the reserved
| purpose of being the escape indicator, it must be escaped
| as "%25" in order to be used as data within a URI.

http://www.ietf.org/rfc/rfc2396.txt
Renaming is not an option.


I find that hard to believe, but OK.

HAGW!

--
Jock
Jul 23 '05 #3
George Hester wrote:
Some images I want to link to using the IMG element have a name
such as hi%20there.jpg.


<img alt="blah" src="hi%2520there.jpg">

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

Jul 23 '05 #4
"Leif K-Brooks" <eu*****@ecritters.biz> wrote in message news:2t*************@uni-berlin.de...
George Hester wrote:
Some images I want to link to using the IMG element have a name such
as hi%20there.jpg.

If the image has these "encodings" in the name how can I force the
browser to use the name exactly as it is? In other words do NOT
encode %20 to space? Renaming is not an option. Thanks.


Encode the % itself: hi%2520there.gif


Ah thanks.

--
George Hester
__________________________________
Jul 23 '05 #5

"Leif K-Brooks" <eu*****@ecritters.biz> wrote in message news:2t*************@uni-berlin.de...
George Hester wrote:
Some images I want to link to using the IMG element have a name such
as hi%20there.jpg.

If the image has these "encodings" in the name how can I force the
browser to use the name exactly as it is? In other words do NOT
encode %20 to space? Renaming is not an option. Thanks.


Encode the % itself: hi%2520there.gif


Request contains invalid encoding. I never seen that before.

Here is the file's name:

n00% 2008.jpg

And the link is this:

http://www.myserver.com/n00%%202008.jpg

dagone it.

--
George Hester
__________________________________
Jul 23 '05 #6
George Hester wrote:
"Leif K-Brooks" <eu*****@ecritters.biz> wrote in message news:2t*************@uni-berlin.de...
George Hester wrote:
Some images I want to link to using the IMG element have a name such
as hi%20there.jpg.

If the image has these "encodings" in the name how can I force the
browser to use the name exactly as it is? In other words do NOT
encode %20 to space? Renaming is not an option. Thanks.


Encode the % itself: hi%2520there.gif


Request contains invalid encoding. I never seen that before.

And the link is this:

http://www.myserver.com/n00%%202008.jpg


Use %2520, not %%20.
Jul 23 '05 #7
"Leif K-Brooks" <eu*****@ecritters.biz> wrote in message news:2t*************@uni-berlin.de...
George Hester wrote:
"Leif K-Brooks" <eu*****@ecritters.biz> wrote in message news:2t*************@uni-berlin.de...
George Hester wrote:

Some images I want to link to using the IMG element have a name such
as hi%20there.jpg.

If the image has these "encodings" in the name how can I force the
browser to use the name exactly as it is? In other words do NOT
encode %20 to space? Renaming is not an option. Thanks.

Encode the % itself: hi%2520there.gif


Request contains invalid encoding. I never seen that before.

And the link is this:

http://www.myserver.com/n00%%202008.jpg


Use %2520, not %%20.


Yeah actually that was what the server gave me. Wasn't me.

I fixed it. It turns out I had to Server.URLEncode in the calling ASP and escape() in the receiving ASP.

--
George Hester
__________________________________
Jul 23 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Val | last post by:
Any experts on mailto: tags? I want to set a link so that the subject and some of the body of the email is filled in. This is easy for simple text, although you need to use %20 for spaces: <a...
3
by: Erik Jensen | last post by:
I am looking to post to a banking site form data in process to do with a checkout I see that the HttpWebRequest object can befilled with header information and form data so that programmatically i...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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:
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.