[whatwg/url] Radix operations are not defined (#318)

The "IPv4 number parser" and the "port state" of the "basic URL parser" mention radix-R (or radix-10) operations. (I presume "radix" is used to avoid confusion with the other definition of "base" used in the same document.)

However, it does not provide instructions on how to perform radix-based operations.

> If input contains a code point that is not a radix-R digit, then return failure.

> Return the mathematical integer value that is represented by input in radix-R notation, using ASCII hex digits for digits with values 0 through 15.

> Let port be the mathematical integer value that is represented by buffer in radix-10 using ASCII digits for digits with values 0 through 9.

It would be good for there to be explicit instructions on how to perform these radix operations (particularly that first one, where R can be 10, 16, or 8, in context), either here or in Infra. Otherwise, it is up to the implementation to determine how to map 10 => 0-9, 16 => 0-F, and 8 => 0-7, a seemingly non-trivial task.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/issues/318

Received on Saturday, 3 June 2017 06:04:51 UTC