Results 1 to 3 of 3
  1. #1
    Sean_J is offline Member
    Join Date
    Feb 2010
    Posts
    16
    Rep Power
    0

    Default Ascii To URL Assistance Needed

    Can someone give me an example of this:

    1)The ASCII characters ‘a’ through ‘z’, ‘A’ through ‘Z’, ‘0’ through ‘9’, ‘_’ (underscore), ‘-‘ (dash), ‘.’ (dot), and ‘*’ (asterisk) remain the same.

    2) The space (blank) character ‘ ‘ is converted into a plus sign ‘+’.

    3) All other characters are converted into the 3-character String “%xy” where xy is the two-digit hexadecimal representation of the lower 8-bits of the character.

    I just need some help with this i need some examples of code to do this so i can get working on a project that i need to make read lines of text and turn it into string and input it into a url.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,452
    Rep Power
    20

    Default

    Other than homework, I don't see any reason to reinvent java.net.URLEncoder, right down to copying the spec from the javadoc. So, since this is homework, you're expected to do it yourself.

    db

  3. #3
    Sean_J is offline Member
    Join Date
    Feb 2010
    Posts
    16
    Rep Power
    0

    Default

    Funny thing is it's not directly related to my homework. It's part of my online lesson I don't understand but thanks for the help.

Similar Threads

  1. Error assistance
    By bobbychiken in forum New To Java
    Replies: 2
    Last Post: 11-21-2009, 11:54 PM
  2. Looking for assistance
    By s_dawg101 in forum New To Java
    Replies: 32
    Last Post: 11-04-2009, 03:49 AM
  3. New to the forum + assistance :)
    By quemadissimo in forum New To Java
    Replies: 4
    Last Post: 10-31-2009, 07:41 AM
  4. In need of some assistance
    By Boer84 in forum New To Java
    Replies: 2
    Last Post: 07-08-2008, 05:14 PM
  5. X-Tremely new to this...Need assistance...
    By Johnny562 in forum New To Java
    Replies: 5
    Last Post: 07-01-2008, 10:17 PM

Tags for this Thread

Posting Permissions

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