This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 25227 - Typo: term 'encode' used instead of 'decode'
Summary: Typo: term 'encode' used instead of 'decode'
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: URL (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: Unsorted
Assignee: Anne
QA Contact: sideshowbarker+urlspec
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-02 07:52 UTC by Vyacheslav Matva
Modified: 2014-04-11 14:10 UTC (History)
1 user (show)

See Also:


Attachments

Description Vyacheslav Matva 2014-04-02 07:52:01 UTC
application/x-www-form-urlencoded parser

Item 6.5 says:
"If use _charset_ flag is set, name is `_charset_`, and get an encoding for value, encoded, does not return failure, unset use _charset_ flag and set encoding override to the result of getting an encoding for value, encoded."

It must say:
"If use _charset_ flag is set, name is `_charset_`, and get an encoding for value, DECODED, does not return failure, unset use _charset_ flag and set encoding override to the result of getting an encoding for value, DECODED."

How it works as I understand it:
  1. We take 'value' part from name-value pair where name is "_charset_". It is byte sequence.
  2. Then we decode this sequence (i.e. we convert it from byte sequence to code point sequence).
  3. Then we try to get encoding by this string (method 'get an encding' from Encoding spec). If getting encoding not fails then we use these encoding to decode other name-value pairs.