Clarify/force encodings in policy templates generation chain |
|||
Issue descriptionPolicy template generation passes several character encodings. We should make sure that these are clearly defined and documented somewhere. The chain is: 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/.. Clarify the encodings somewhere (README?) Also note where those encodings are defined and make sure that this doesn't rely on luck. - policy_templates.json is just utf-8 because that's the way it has been checked in into the repo - we're fixing the grit input encoding in bug 758836 - the grit output encoding seems to be a default / luck, think about fixing this too with output_encoding parameter in the <structure> tag in the policy_templates.grd file, similar to what has been done for input encoding in bug 758836 . Current "else" clause which sets the default encoding: https://cs.chromium.org/chromium/src/tools/grit/grit/tool/build.py?rcl=739fd18dea26b116c03b484145a4163903448b8c&l=381 - template_formatter.py input encoding is set here: https://cs.chromium.org/chromium/src/components/policy/tools/template_writers/template_formatter.py?rcl=c86130404ec109d1bd06422e3db5cde09e1820ad&l=171 - template_formatter.py output encoding is per output type and is set here: https://cs.chromium.org/chromium/src/components/policy/tools/template_writers/template_formatter.py?rcl=c86130404ec109d1bd06422e3db5cde09e1820ad&l=48
,
Oct 19 2017
,
Feb 6 2018
|
|||
►
Sign in to add a comment |
|||
Comment 1 by pmarko@chromium.org
, Oct 19 2017