Currently, we use nsACString both for encoding labels and encodings. If we had a special type for encodings, it would be more obvious which values are labels that must be resolved into encodings before use and which are encodings that must not be re-resolved to avoid the fact that "replacement" is an encoding but unknown as a label.
Bug 1261841 has landed. It adds const mozilla::Encoding* for this purpose. Next we need to use it everywhere.
You need to log in before you can comment on or make changes to this bug.