Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > %23 and #, which should I be worried about?

Reply
Thread Tools

%23 and #, which should I be worried about?

 
 
Omar
Guest
Posts: n/a
 
      04-26-2005
Hi,

I'm using the '#' character to concatenate some information to the
URL. For example:

filtrado3.jsp?estatus=Certificado&valor=Certificad o&campo=estatus&ca=ejecutivo#tipo&va=Daniel+Perez# CONC.

But, when I see the URL, it's something like this:

filtrado3.jsp?estatus=Certificado&valor=Certificad o&campo=estatus&ca=ejecutivo%23tipo&va=Daniel+Pere z%23CONC.

I must access to "ca" and "va" values. I've been considering that the
real character is '#', but nothing happens. And, when I try to
consider the "%23" string, nothing happens. What am I doing wrong?

TIA.
 
Reply With Quote
 
 
 
 
Robert
Guest
Posts: n/a
 
      04-26-2005
I'd stop using # or you're gonna have to decode the url. Certain
characters are encoded by the browser when they are placed in an url.
Like I think space is %20. Try using dash(-) or '.'

 
Reply With Quote
 
 
 
 
Betty
Guest
Posts: n/a
 
      04-26-2005

"Omar" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> Hi,
>
> I'm using the '#' character to concatenate some information to the
> URL. For example:
>
>

filtrado3.jsp?estatus=Certificado&valor=Certificad o&campo=estatus&ca=ejecuti
vo#tipo&va=Daniel+Perez#CONC.
>
> But, when I see the URL, it's something like this:
>
>

filtrado3.jsp?estatus=Certificado&valor=Certificad o&campo=estatus&ca=ejecuti
vo%23tipo&va=Daniel+Perez%23CONC.
>
> I must access to "ca" and "va" values. I've been considering that the
> real character is '#', but nothing happens. And, when I try to
> consider the "%23" string, nothing happens. What am I doing wrong?
>

In URL parlance, the '#' denotes a location within the page, so this
is an invalid URL (my opinion )
I don't see why you need the '#' anyway, so why?

Hex 23 is the '#' character in ASCII.
Are you saying it is not there so nothing happens?
If it is there, how do you try to access it?


 
Reply With Quote
 
Michael Winter
Guest
Posts: n/a
 
      04-26-2005
Robert wrote:

[Quotation added. Please quote relevant
material when responding to a post.]

> Omar wrote:
>
>> I'm using the '#' character to concatenate some information to the
>> URL.

>
> I'd stop using # or you're gonna have to decode the url. [...] Try
> using dash(-) or '.'


There are several characters that the OP could choose from. Hyphens (-),
underscores (_), dots (.), exclamation marks (!), tildes (~), asterisks
(*), apostrophes ('), and parentheses () are all considered to be
unreserved within URLs. A hash (#), however, is reserved for separating
the fragment identifier and the rest of the URL.

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
 
Reply With Quote
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      05-08-2005
Omar wrote:

> I'm using the '#' character to concatenate some information to the
> URL.


You are not allowed to. According to RFC 2396 "Uniform Resource
Identifiers", the `#' character delimits the fragment ID in an URI.
Unless there is a fragment with that ID in the target resource
addressed by the URI, it must not be used (uncoded). Use query part
components for that instead, delimited with `&' and encoded properly.

I wonder what this has to do with JavaScript or Java.
And do you know that those are different languages?

> I must access to "ca" and "va" values. I've been considering that the
> real character is '#', but nothing happens. And, when I try to
> consider the "%23" string, nothing happens. What am I doing wrong?


You do not take heed of Internet standards.


PointedEars
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Gates thinks Google should be worried! alex C Programming 4 03-10-2007 04:30 PM
Bill Gates thinks Google should be worried! alex Computer Support 8 03-08-2007 04:11 PM
Bill Gates thinks Google should be worried! alex C++ 2 03-07-2007 04:29 PM
Computer Display Shakes: Should I Be Worried? Julie P. Computer Support 16 10-08-2005 02:47 PM
%23 and #, which should I be worried about? Omar Javascript 4 05-08-2005 02:55 PM



Advertisments