Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #3547
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | Nigel Wade <nmw-news@ion.le.ac.uk> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Android: create drawable from path |
| Date | Thu, 05 May 2011 09:39:32 +0100 |
| Lines | 47 |
| Message-ID | <92f625F2n3U1@mid.individual.net> (permalink) |
| References | <90opnjFunsU1@mid.individual.net> <908b85be-4c87-4bd6-b5f1-4b82ffeea13e@b13g2000prf.googlegroups.com> <90p3v4Fe4fU1@mid.individual.net> <io7skv$np5$1@news.albasani.net> <90pfmdF17bU1@mid.individual.net> <99mdnexwGbGIDDrQnZ2dnUVZ_h6dnZ2d@earthlink.com> <90pkrcF1aaU1@mid.individual.net> <moqdnQS2TfIcWjrQnZ2dnUVZ_s2dnZ2d@earthlink.com> <90qlgfFt2vU1@mid.individual.net> <o4ednUsm87v17DXQnZ2dnUVZ_vmdnZ2d@earthlink.com> <92dgnmF3ciU1@mid.individual.net> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | 7bit |
| X-Trace | individual.net 75e573YnwUD3TCEbOlq7QQcZ0soxJbz4fF/C5F60GM25dJ8Jrx |
| Cancel-Lock | sha1:vWujqeAE6jWR91zedNr34bDKcC4= |
| User-Agent | Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.1.16) Gecko/20101125 SUSE/3.0.11 Thunderbird/3.0.11 |
| In-Reply-To | <92dgnmF3ciU1@mid.individual.net> |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:3547 |
Show key headers only | View raw
On 04/05/11 18:29, Dirk Bruere at NeoPax wrote:
> Any suggestions as to why this url causes an exception (I assume its
> illegal characters or something)
>
> http://192.168.0.6:8081/video/clip_art/pan's.labyrinth[2006]dvdrip[eng.sub]-axxo+new.+swesub.+prien.avi.jpg
>
>
> and this does not
> http://192.168.0.6:8081/Audio/Album+Art/P-T/Therion_Sirius+B.jpg
>
> when used here:
>
> InputStream content = (InputStream) url.getContent();
>
It should be encoded with java.net.URLEncoder. There are characters in
that string which are not "safe" within a URL.
From RFC 1738:
> Unsafe:
>
> Characters can be unsafe for a number of reasons. The space
> character is unsafe because significant spaces may disappear and
> insignificant spaces may be introduced when URLs are transcribed or
> typeset or subjected to the treatment of word-processing programs.
> The characters "<" and ">" are unsafe because they are used as the
> delimiters around URLs in free text; the quote mark (""") is used to
> delimit URLs in some systems. The character "#" is unsafe and should
> always be encoded because it is used in World Wide Web and in other
> systems to delimit a URL from a fragment/anchor identifier that might
> follow it. The character "%" is unsafe because it is used for
> encodings of other characters. Other characters are unsafe because
> gateways and other transport agents are known to sometimes modify
> such characters. These characters are "{", "}", "|", "\", "^", "~",
> "[", "]", and "`".
>
> All unsafe characters must always be encoded within a URL. For
> example, the character "#" must be encoded within URLs even in
> systems that do not normally deal with fragment or anchor
> identifiers, so that if the URL is copied into another system that
> does use them, it will not be necessary to change the URL encoding.
>
>
--
Nigel Wade
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
Android: create drawable from path Dirk Bruere at NeoPax <dirk.bruere@gmail.com> - 2011-04-14 18:37 +0100
Re: Android: create drawable from path Lew <lew@lewscanon.com> - 2011-04-14 12:06 -0700
Re: Android: create drawable from path Dirk Bruere at NeoPax <dirk.bruere@gmail.com> - 2011-04-14 21:32 +0100
Re: Android: create drawable from path Lew <noone@lewscanon.com> - 2011-04-14 18:32 -0400
Re: Android: create drawable from path Dirk Bruere at NeoPax <dirk.bruere@gmail.com> - 2011-04-15 00:52 +0100
Re: Android: create drawable from path Patricia Shanahan <pats@acm.org> - 2011-04-14 17:28 -0700
Re: Android: create drawable from path Dirk Bruere at NeoPax <dirk.bruere@gmail.com> - 2011-04-15 02:20 +0100
Re: Android: create drawable from path Patricia Shanahan <pats@acm.org> - 2011-04-14 21:20 -0700
Re: Android: create drawable from path Dirk Bruere at NeoPax <dirk.bruere@gmail.com> - 2011-04-15 11:38 +0100
Re: Android: create drawable from path Patricia Shanahan <pats@acm.org> - 2011-04-15 09:25 -0700
Re: Android: create drawable from path Dirk Bruere at NeoPax <dirk.bruere@gmail.com> - 2011-05-04 18:29 +0100
Re: Android: create drawable from path markspace <-@.> - 2011-05-04 11:24 -0700
Re: Android: create drawable from path Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2011-05-04 20:27 +0200
Re: Android: create drawable from path Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-05-05 09:39 +0100
Re: Android: create drawable from path Lew <noone@lewscanon.com> - 2011-04-15 07:27 -0400
csiph-web