<div class="gmail_quote">On Sun, Mar 15, 2009 at 8:40 PM, Alexander Dunlap <span dir="ltr">&lt;<a href="mailto:alexander.dunlap@gmail.com">alexander.dunlap@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
I have noticed that in both Data.Binary and Data.Text (which is still<br>
experimental, but still), the &quot;decode&quot; functions can be undefined<br>
(i.e. bottom) if they encounter malformed input.<br>
</blockquote><div><br>For decoding Unicode, it&#39;s typical to provide a flexible API that can do one of the following on a bad encoding:<br><ul><li>Substitute a character</li><li>Skip it</li><li>Return the partial decode</li>
<li>Throw an exception</li></ul>I just haven&#39;t gotten there yet. <br></div></div>