Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Please!!!! I need someones advice on this error.

 

We've an application intended for mexican users (in spanish) as most of you know in spanish they use accents (á,é, etc), well, we create a XML file with the configurations, labels names, etc. last friday it was working perfectly, the XMLTextReader was reading the XML with no problems at all, now, I get this error

 

"There is an invalid character in the given encoding. Line 4, position 25. "

 

if I look into that line and position there an accent (á), how can I make the reader to accept accents???? but the strangest thing here is that it was working perfectly and today I guess the framework got up in a bad mood or something.

Can you help me with this? Thanks in advance

Fat kids are harder to kidnap
  • *Experts*
Posted

I may be off, but I thought that XML, like HTML, was "english" ASCII based. Meaning, you couldn't have those non-"standard" characters in there. I think they needed to be encoded inbetween CDATA blocks or converted to their numeric equivalent, such as "%27". Might be wrong though...

 

-ner

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Posted

nothing is working, this is really weird, the same XML was used last week and was working perfectly, and now it's not, we're looking for a solution, if you've more ideas will be well recieved, otherwise if we find out what's going on I'll let you know

 

Thanks in advance for your help

Fat kids are harder to kidnap
Posted

Well after checking everything in the application we found the problem...

 

XML can accept accents, it's not an "english" based markup language, the main problem was that the encoding used was UTF8 (by default) but at some point of the application the XML needed to be edited, so the dude that developed that part never thought that sending and encoding diff from UTF8 will generate this problem.

So the problem was the encoding used, now the problem is solved, so boys and girls if you're using XML's check that the same encoding is used around your application.

 

Thank you guys for the help and guide :D

Fat kids are harder to kidnap

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...