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-Original-Commit-Position: refs/heads/master@{#513512}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0c61a1ebc26599b4a980d794e8c050f226d578b4
1 file changed
tree: a4f7873ddad030055629af42c6cb14c84c11ccfb
  1. android/
  2. core/
  3. proto/
  4. resources/
  5. tools/
  6. BUILD.gn
  7. OWNERS
  8. policy_export.h