[GTK] Fails to build documentation when output is redirected
Created attachment 228529 [details] Patch
I found this while building webkit-clutter which also uses those scripts: Traceback (most recent call last): File "../Tools/gtk/generate-gtkdoc", line 296, in <module> saw_webkit1_warnings = generate_doc(generator) File "../Tools/gtk/generate-gtkdoc", line 233, in generate_doc generator.generate(html='--skip-html' not in sys.argv) File "/usr/src/packages/BUILD/webkit-clutter-2.3.5+20140313+c798d3a/Tools/gtk/gtkdoc.py", line 147, in generate self._run_gtkdoc_fixxref() File "/usr/src/packages/BUILD/webkit-clutter-2.3.5+20140313+c798d3a/Tools/gtk/gtkdoc.py", line 369, in _run_gtkdoc_fixxref self._run_command(args, cwd=self.output_dir, ignore_warnings=True) File "/usr/src/packages/BUILD/webkit-clutter-2.3.5+20140313+c798d3a/Tools/gtk/gtkdoc.py", line 194, in _run_command sys.stdout.write(stdout) UnicodeEncodeError: 'ascii' codec can't encode character u'\u201c' in position 3856: ordinal not in range(128) make[3]: *** [docs-build.stamp] Error 1
Seems like another option would be: export PYTHONIOENCODING=utf-8
I think relying on setting something on the environment is not that great =/
Comment on attachment 228529 [details] Patch This approach seems fine to me, but can we move this to generate-gtkdoc?
I did before I uploaded the patch, following our discussion on IRC =)
Comment on attachment 228529 [details] Patch Sorry! I was going too fast.
Committed r167669: <http://trac.webkit.org/changeset/167669>