Friday, April 22, 2011

Re: [android-developers] Re: SAXParser throws exception for bad character in CDATA block, bug???

Agreed.

Apps are often expected to deal with existing data even if it's malformed.

From the user's point of view, it's "but it worked in that other
program(s)", which unfortunately keeps supporting a particular bad data
set further.

A possible fix would be to let the user choose a character set for the
data in question, or make a reasonable guess, perhaps both - combined
with contacting the creators of such malformed data set, describing the
issue and asking to fix it.

This is not limited to XML either: browsers and email clients also offer
ways for the user to specify the character set for the case when the
data is malformed.

For an internal project, this can be different - "we will not accept
your data unless you fix it" is clearly the better choice.

-- Kostya

22.04.2011 16:30, Zsolt Vasvari пишет:
>> It is in most cases, far better to instantly, irrevocably, fail. Don't let
>> that bad data get any further.
> Very well written post, and I totally agree with in an ideal world.
>
> Unfortunately, we don't live in an ideal world, but in a world where
> if the app doesn't do as our users want, we end up with a bunch of 1-
> stars and our sales will suffer. So sometime, you have to do
> something reasonable with bad data. My app has to deal with this ALL
> the time.
>


--
Kostya Vasilyev -- http://kmansoft.wordpress.com

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate