Geeks With Blogs
Shahed's blog Sharing my thoughts and work

I was making a simple rss reader and for some feeds, I was always getting this error “' ', hexadecimal value 0x1F, is an invalid character. Line 1, position 1.”

finally, I found that, well-formed xml does not allow '0x1F'. The range of well-formed xml is

Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] |
[#x10000-#x10FFFF]

in my case, it was caused for allowing 'gzip' in the request header.

Posted on Wednesday, March 22, 2006 2:07 AM | Back to top


Comments on this post: ' ', hexadecimal value 0x1F, is an invalid character. Line 1, position 1.

# re: ' ', hexadecimal value 0x1F, is an invalid character. Line 1, position 1.
Requesting Gravatar...
Also often caused by the BOM, a marker byte as first character in Unicode (UTF-8, UTF-16) files.
Left by OddesE on Sep 17, 2007 9:10 AM

# re: ' ', hexadecimal value 0x1F, is an invalid character. Line 1, position 1.
Requesting Gravatar...
I also get this, some of the time, while reading XML. Some of that XML comes down gziped- and i unzip it- but it doesnt fail all the time.

what did you do to fix this?
Thanks
Left by Tom Beech on May 13, 2010 3:02 AM

Your comment:
 (will show your gravatar)


Copyright © Shahedul Huq Khandkar | Powered by: GeeksWithBlogs.net