How to escape Illegal Character '|'

Nidhi

Url which I am using to parse a document read using Json is:

https://graph.facebook.com/150205375156742/feed?access_token=520625188052604|GsCYVGBJKs5N_O1AX9XrrsulrWc

which is throwing IllegalArgumentException:

04-19 23:08:02.220: E/AndroidRuntime(17068): Caused by: java.lang.IllegalArgumentException: Illegal character in query at index 76: https://graph.facebook.com/150205375156742/feed?access_token=520625188052604|GsCYVGBJKs5N_O1AX9XrrsulrWc

when I am trying to encode the url using urlEncoder.encode() it is causing another exception:

04-20 11:43:16.280: W/System.err(31984): java.net.UnknownHostException: Unable to resolve host "graph.facebook.com": No address associated with hostname
laalto

when I am trying to encode the url

Don't URL encode the whole URL. Just encode the parts, for example the value part of access_token. That should turn the | to %7c.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Illegal Escape Character "\("?

From Dev

Illegal escape character java

From Dev

Regex expressions (“illegal escape character”)

From Dev

How to escape the ' character in sas?

From Dev

How to escape a character in vba

From Dev

How to escape + character in java?

From Dev

How to ignore escape character ?

From Dev

How to escape the ' character in sas

From Dev

Error: illegal escape character - when trying to create a path

From Dev

how to escape the pipe character in grep?

From Dev

How to escape pipe character ('|') in PostgreSQL

From Dev

How to replace escape character with a string

From Dev

PIP how escape character # in password?

From Dev

How to escape the character \ in PHP and Javascript?

From Dev

how to find escape character \ in a string?

From Dev

How to encode url to prevent Illegal Character in url

From Dev

How to Validate illegal character username jQuery

From Dev

How to display backslash in json object value in java - Illegal escape JSONException

From Dev

How do I escape an escape character with ANTLR 4?

From Dev

How to interpret user input of escape character?

From Dev

How to escape a character in Regex expression in Java

From Dev

How to escape @ character in ASP.NET Razor

From Dev

How to escape a { character in a MessageFormat pattern string?

From Dev

How can I escape character '&' in Path in XAML?

From Dev

Razor: how to escape dot character next to a variable?

From Dev

how to escape character in VBA with access for an regex string

From Dev

Php how to escape character of file path

From Dev

How to find list of escape character for sqlite

From Dev

How to escape all special character for regex in python

Related Related

HotTag

Archive