element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Autodesk EAGLE
  • Products
  • More
Autodesk EAGLE
EAGLE User Support (English) netget() translates URLs incorrectly.
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Autodesk EAGLE to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 22 replies
  • Subscribers 180 subscribers
  • Views 2320 views
  • Users 0 members are here
Related

netget() translates URLs incorrectly.

Former Member
Former Member over 11 years ago

I'm trying to use Eagle 5.11 and netget() to get some information from a webpage. The URL contains the string "%2F". When netget() sees that string, it translates it to "%252F". Is there a way to get netget() to leave the characters in a URL alone?

  • Sign in to reply
  • Cancel
  • autodeskguest
    0 autodeskguest over 11 years ago

    On 22/02/14 05:45, Dave Vandenbout wrote:

    I'm trying to use Eagle 5.11 and netget() to get some information from a

    webpage. The URL contains the string "%2F". When netget() sees that

    string, it translates it to "%252F". Is there a way to get netget() to

    leave the characters in a URL alone?

     

    This modification is a syntactic requirement of URLs. Certain characters

    are not legal in a URL and must be escaped. The way this is done is to

    convert them to their ASCII code in HEX preceded by the % symbol.

    Because of this use of %, the % character itself must be escaped, ending

    up as %25.

     

    Now, armed with that knowledge, you will see that your problem is not

    that you can't put %2F in the URL but that the URL you want contains a

    character which had to be escaped to %2F. The bad news is that there's

    no good reason for that because 2F is the ASCII code of '/' - which is

    the path separator. So either your URL got broken in translation and the

    %2F should become a '/', or it's broken by design in which case you

    probably NEED the behaviour you're complaining about.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to autodeskguest

    Thanks for the reply, but you've misunderstood my problem. The URL I'm trying to access has the literal string of "%2F" in it. (I realize this is the escaped code for a '/'. So did the creator of the webpage. That's why he placed the "%2F" in there, and not an actual forward slash.) But I am unable to place a literal of "%2F" into the URL because netget() sees the initial '%' character and escapes it by translating it into "%25", thus giving me a final URL with "%252F" in it.

     

    Now my way out of this would be to place a '/' into the URL and then have netget() translate that into "%2F". But that doesn't happen because a '/' is the path separator (as you pointed out), so netget() just leaves it as a '/' instead of replacing it with "%2F". (That's a good thing, otherwise netget() would escape all the other slashes that actually are path separators in the URL, too.)

     

    So my problem is I can't put "%2F" into the URL directly because netget() translates that to "%252F", and I can't put '/' into the URL because netget() looks at that as the path separator and does not translate it at all so it stays as a '/'.

     

    So, to repeat, I need a way to make netget() stop escaping characters because it's doing it wrong in this specific case.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • AnalogNotes
    0 AnalogNotes over 11 years ago in reply to Former Member

    I'm completely going out on a limb here as I have no way to test this, but have you tried putting a backslash in front of the percent sign?  Or what about putting single quotes around the literal '%2F'?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to AnalogNotes

    Hi, Doug. Thanks for your suggestions.

     

    I tried the backslash before with the string "\%2F" and netget translates that into "%5C%252F". So netget() is translating the backslash into "%5C" and the percent into "%25".

     

    I tried putting single quotes around it like '%2F' inside the URL string. netget() just translates that into '%252F'. So it just ignores the single quotes and still goes inside to translate the percent sign.

     

    BTW, here's the URL I'm trying to access with netget(): PIC18F14K50-I/SS Microchip Technology | PIC18F14K50-I/SS-ND | DigiKey You'll have to hover over it to see the actual URL. I am able to access this page using Python. I am unable to access the page using netget() with the same URL because of the translation errors.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • AnalogNotes
    0 AnalogNotes over 11 years ago in reply to Former Member

    Ugh.  That sucks.  (BTW, hovering didn't give me the escaped literals, but copying and pasting into a new tab showed it to me.)  I just took a look through the EAGLE release notes to see if there were any changes in newer versions, but I didn't find anything.

     

    I wonder if Jorge has any ideas.  I'll ask him in the morning when I follow up with him about a different email message...

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • autodeskguest
    0 autodeskguest over 11 years ago in reply to Former Member

    Dave Vandenbout wrote on Tue, 25 February 2014 23:18

    The URL I'm trying to access has the literal string of "%2F" in it. (I

    realize this is the escaped code for a '/'. So did the creator of the

    webpage.

     

     

    That seems to be the real problem here.

    --

    Web access to CadSoft support forums at www.eaglecentral.ca.  Where the CadSoft EAGLE community meets.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • autodeskguest
    0 autodeskguest over 11 years ago in reply to Former Member

    Dave Vandenbout scribbled thus:

     

    (http://www.digikey.com/product-detail/en/PIC18F14K50-I%2FSS/PIC18F14K50-I%2FSS-ND/1999472)

     

    Are you sure that the link actually exists ?

     

    Digikey gives me a "404" Page not found.

     

    --

    Best Regards:

                          Baron.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • dukepro
    0 dukepro over 11 years ago in reply to autodeskguest

    On 02/26/2014 08:19 AM, Baron wrote:

    Dave Vandenbout scribbled thus:

     

    (http://www.digikey.com/product-detail/en/PIC18F14K50-I%2FSS/PIC18F14K50-I%2FSS-ND/1999472)

     

    The translation to "%2C2F" is indeed correct behavior.  Any ordinary

    browser makes the same translation behind the scenes.

     

    If you watch the HTTP traffic, among the request headers will be a line

    that starts with "GET", and is followed by the escaped URL.  The reason

    the "%2F" is there in the first place is because the author did not want

    the "/" interpreted as a path separator by the web server - it is

    intended to be part of a search term.  Since the '%' character is used

    as an escape character, it itself had to be translated to %2C.

    Are you sure that the link actually exists ?

     

    Digikey gives me a "404" Page not found.

     

    Regarding the above link, I clicked it and Digikey brought me right to

    the part without error.  I'm using Thunderbird to read the newsgroup,

    and Firefox as my default browser.

     

    HTH,

        - Chuck

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • autodeskguest
    0 autodeskguest over 11 years ago in reply to dukepro

    Chuck Huber scribbled thus:

     

    On 02/26/2014 08:19 AM, Baron wrote:

    Dave Vandenbout scribbled thus:

     

     

    (http://www.digikey.com/product-detail/en/PIC18F14K50-I%2FSS/PIC18F14K50-I%2FSS-ND/1999472)

     

    The translation to "%2C2F" is indeed correct behavior.  Any ordinary

    browser makes the same translation behind the scenes.

     

    If you watch the HTTP traffic, among the request headers will be a

    line

    that starts with "GET", and is followed by the escaped URL.  The

    reason the "%2F" is there in the first place is because the author did

    not want the "/" interpreted as a path separator by the web server -

    it is

    intended to be part of a search term.  Since the '%' character is used

    as an escape character, it itself had to be translated to %2C.

    Are you sure that the link actually exists ?

     

    Digikey gives me a "404" Page not found.

     

    Regarding the above link, I clicked it and Digikey brought me right to

    the part without error.  I'm using Thunderbird to read the newsgroup,

    and Firefox as my default browser.

     

    HTH,

        - Chuck

     

    Thanks Chuck,

    I too am using Firefox.  So it didn't interpret it correctly for me

    either.

     

    --

    Best Regards:

                          Baron.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • autodeskguest
    0 autodeskguest over 11 years ago in reply to autodeskguest

    Baron scribbled thus:

     

    Dave Vandenbout scribbled thus:

     

     

    (http://www.digikey.com/product-detail/en/PIC18F14K50-I%2FSS/PIC18F14K50-I%2FSS-ND/1999472)

     

    Are you sure that the link actually exists ?

     

    Digikey gives me a "404" Page not found.

     

     

    If I cut and paste the link it works properly.  Neither Firefox or

    Chrome find the page if I just click on the link.

    Sorry for the confusion ! Now I understand what is happening.

    --

    Best Regards:

                          Baron.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube