Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Treat policy_templates.json as utf-8 encoded when translating
Set the encoding of the policy_templates.json input file to utf-8. Until now, its encoding was not specified in the translation definition (grd file), which resulted in a default cp1252 encoding, leading to bad characters in the output (and transitively in all generated artifacts, including HTML policy docs, ADM/ADMX/ADML files, plist files, ..). Note that we're not touching the encoding of grit's output files, so the processing chain will now be: policy_templates.json (utf-8) --(expect utf-8)--> grit --(write utf-16)--> policy_templates_<lang>.json (utf-16) --(expect utf-16)--> template_formatter.py --(write encoding(X))--> X=doc/admx/plist/.. The mismatch was that while policy_templates.json was encoded in utf-8, grit expected utf-16 input encoding. BUG=758836 TEST=Generated policy documentation (gn target policy_templates) and verified that special characters are treated properly. Change-Id: I266a15b2ce78490ce9676905c105f20dfafbdfca Reviewed-on: https://chromium-review.googlesource.com/707101 Commit-Queue: Pavol Marko <pmarko@chromium.org> Reviewed-by: Maksim Ivanov <emaxx@chromium.org> Cr-Commit-Position: refs/heads/master@{#513512}
- Loading branch information