Re: getNumberOfChars(), 16-bit units, and Acid3

On Fri, 15 Feb 2008, Cameron McCormack wrote:
> Anne van Kesteren:
> > Hereby a request to change both SVG 1.1 and Acid3. I'd like SVG 1.1 to  
> > change to say that the method getNumberOfChars() is based on 16-bit units  
> > and that Acid3 drops the following test:
> > 
> >   if (numberOfChars == expectedAdvances.length + 1)
> > 
> > The rationale for this is that the DOM is based on 16-bit units 
> > throughout. DOMString, DOM Level 2 Traversal and Range, etc. In 
> > additiona, ECMAScript is based on 16-bit units too. While I understand 
> > that this is an unfortunate legacy I don't think SVG is to place to be 
> > different from all other APIs in existence. I'd like the APIs for 
> > developers to be as consistent as possible and if that requires 16-bit 
> > units because of unfortunate legacy so be it.
> 
> The SVG WG discussed this at our F2F this week, and decided that it is 
> reasonable to change this to be in terms of UTF-16 codepoints instead. 
> An erratum has been added for SVG 1.1, which will be publicly visible 
> the next time the errata document is published.
> 
> Probably the other text-related methods will need to be changed in a 
> similar way, too.
> 
> Ian, please update the test to remove the “ + 1” from that line.

I can't update the test without knowing what the other methods are going 
to be changed to.

What's the start position of each part of a surrogate pair?

Specifically, what's the return value of getStartPositonOfChar() and 
t.getEndPositionOfChar() with a surrogate pair high word and with a 
surrogate pair low word?

Is there an errata I can look at?

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Friday, 15 February 2008 01:20:49 UTC