Bug 131178

Summary: [GTK] Fails to build documentation when output is redirected
Product: WebKit Reporter: Gustavo Noronha (kov) <gustavo>
Component: New BugsAssignee: Gustavo Noronha (kov) <gustavo>
Status: RESOLVED FIXED    
Severity: Normal CC: pnormand
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch mrobinson: review+

Gustavo Noronha (kov)
Reported 2014-04-03 12:08:56 PDT
[GTK] Fails to build documentation when output is redirected
Attachments
Patch (1.41 KB, patch)
2014-04-03 12:10 PDT, Gustavo Noronha (kov)
mrobinson: review+
Gustavo Noronha (kov)
Comment 1 2014-04-03 12:10:06 PDT
Gustavo Noronha (kov)
Comment 2 2014-04-03 12:11:40 PDT
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
Philippe Normand
Comment 3 2014-04-09 05:52:47 PDT
Seems like another option would be: export PYTHONIOENCODING=utf-8
Gustavo Noronha (kov)
Comment 4 2014-04-09 06:46:58 PDT
I think relying on setting something on the environment is not that great =/
Martin Robinson
Comment 5 2014-04-09 07:33:54 PDT
Comment on attachment 228529 [details] Patch This approach seems fine to me, but can we move this to generate-gtkdoc?
Gustavo Noronha (kov)
Comment 6 2014-04-15 05:28:35 PDT
I did before I uploaded the patch, following our discussion on IRC =)
Martin Robinson
Comment 7 2014-04-15 05:42:59 PDT
Comment on attachment 228529 [details] Patch Sorry! I was going too fast.
Gustavo Noronha (kov)
Comment 8 2014-04-22 11:13:28 PDT
Note You need to log in before you can comment on or make changes to this bug.