[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Encoding Standard (mostly complete)



On Wed, 18 Apr 2012 07:11:14 +0200, Bjoern Hoehrmann <derhoermi@gmx.net>  
wrote:
> * Anne van Kesteren wrote:
>> Apart from big5, all encoders and decoders are now defined.
>>
>> http://dvcs.w3.org/hg/encoding/raw-file/tip/Overview.html
>
> What is your reasoning behind "defining" how to decode UTF-8?

The idea is to remove the need for
http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#utf-8


> It seems
> to me this is well understood and does not require yet another speci-
> fication. Anyone wanting to implement a UTF-8 decoder would have to
> compare your proposal to the other specifications to see if there are
> any differences, and if there are any differences, find out or decide
> if that's due to errors in your specification, and whether they want to
> adopt your specification rather than any of the others. That's not a
> good use of anyone's resources.

I agree, but referencing another specification and then trying to  
carefully subset it because it does not do what you want does not seem  
ideal either. And it would be inconsistent with the rest of the standard.

I don't really mind changing this though. We could do something like what  
HTML has done instead, but it just seems rather messy to me.


> I don't feel like reverse-engineering your assembly code and clicking
> through half a dozen of definitions to confirm this, but it seems as
> though your decoder is rather buggy, there is nothing obvious for in-
> stance that would protect against overlong sequences.

"utf-8 lower boundary" takes care of that.


-- 
Anne van Kesteren
http://annevankesteren.nl/