Results 1 to 5 of 5

Thread: what is the difference between these two addresses?

  1. #1
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    2,385
    Thanks
    100
    Thanked 113 Times in 111 Posts

    Default what is the difference between these two addresses?

    Code:
    <?php
    $a="http://www.will-law.org/home/Case-Updates/2012/09/14/BREAKING-NEWS---Dane-County-Judge-Declares-Significant-Portions-of-Act-10-Unconstitutional";
    $b="http://www.will-law.org/home/Case-Updates/2012/09/14/BREAKING-NEWS---Dane-County-Judge-Declares-Significant-Portions-of-Act-10-Unconsti*tutional";
    
    if ($a==$b) echo "the same";
    echo '<a href="http://www.will-law.org/home/Case-Updates/2012/09/14/BREAKING-NEWS---Dane-County-Judge-Declares-Significant-Portions-of-Act-10-Unconstitutional">a</a>
    <br><a href="http://www.will-law.org/home/Case-Updates/2012/09/14/BREAKING-NEWS---Dane-County-Judge-Declares-Significant-Portions-of-Act-10-Unconsti*tutional">b</a>'
    ?>
    I have not figured it out, but here is a hint. They both go to two different addresses. When I posted it as code the second link shows an A with a halo over it between the i and t of constitutional.
    To choose the lesser of two evils is still to choose evil. My personal site

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    There's an asterisk (*) in the second one. This is obvious when they're presented in a monospace font, as in the code example in your post.
    Was there a deeper question than this?

    There's probably some sort of URL rewriting going on on that website, so I don't know exactly what the difference in interpretation might be. The * seems to give a server warning, so maybe it's just not allowed in URLs at all (not sure about that) or maybe the server is being overly cautious with weird URLs.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    2,385
    Thanks
    100
    Thanked 113 Times in 111 Posts

    Default

    That wasn't the code I posted....

    I have created a temporary file on my website here.

    I just realized that I can try looking at the html entities of the code I posted. When I did ­ showed up. According to wikipedia it is a type of white space I did not know existed called a soft hyphen. It only displays as a hyphen if the line is long enough that the word breaks apart. It also tells the browser where to break the word if it becomes necessary to do so. Otherwise it is invisible. In my case it was apparently not invisible enough.
    To choose the lesser of two evils is still to choose evil. My personal site

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Hm, looks like the board automatically translated that character into *?

    I don't see a difference in the links on the HTML page, no.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Depends upon the browser. Opera shows the second link as ending in:

    Unconsti*tutional

    Ooops, the board did it again. The * is an  (a capital A with a carrot (^) on top, hex value C2).

    Chrome and IE 9 show it as a dash (-).

    Firefox doesn't show it at all.

    Pasting the link it into a blank page in EditPadPro shows it as a dash (-). The hex value of the character is AD though. A normal dash is 2D.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Similar Threads

  1. Replies: 2
    Last Post: 08-16-2012, 01:10 AM
  2. Mailing to multiple addresses
    By captainjustin in forum PHP
    Replies: 1
    Last Post: 03-14-2010, 05:58 AM
  3. A script that collects email addresses?
    By danno in forum Looking for such a script or service
    Replies: 3
    Last Post: 04-07-2007, 02:14 AM
  4. IP Addresses
    By odd-1 in forum JavaScript
    Replies: 1
    Last Post: 11-04-2005, 04:45 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •