Skip to content

Conversation

mattpap
Copy link
Member

@mattpap mattpap commented Mar 4, 2013

My xelatex generates output with non UTF8 characters. In effect, symy-bot failed just after testing documentation.

@asmeurer
Copy link
Member

asmeurer commented Mar 4, 2013

Are you sure this is really an error that should be silenced? It sounds like you have a bug with your setup. Does the PDF render fine?

@mattpap
Copy link
Member Author

mattpap commented Mar 4, 2013

I think so. I'm surprised that there weren't problems before (maybe latex version isn't tested very often). Generated PDF looks good (special characters and diacritics are all in place). Only output contains "improperly" encoded characters in warning messages.

@asmeurer
Copy link
Member

asmeurer commented Mar 4, 2013

An issue with your terminal then? Both @jrioux (I believe) and myself have been building the PDF just fine.

@jrioux
Copy link
Member

jrioux commented Mar 5, 2013

Encoding errors are nasty because they bring the whole bot to an halt. I have been running the bot from this branch for a bit and it works for me, so if it works for you too, then let's put it in. But can we please just put the 'ignore' directly in the call to decode() instead of defining a global variable?

@asmeurer
Copy link
Member

asmeurer commented Mar 5, 2013

Is there an option other than ignore that will not kill the bot but will still print the error? My main concern here is masking some future error.

@mattpap
Copy link
Member Author

mattpap commented Mar 5, 2013

See http://docs.python.org/2/library/stdtypes.html#str.decode. We can ignore errors, replace invalid byte sequences with 0xfffd (unicode replacement character) or (what I didn't know before) register a callback to handle errors. However, I think the whole idea with decoding process output using terminal encoding is wrong, because we can't assume that a process (like xetex) will respect that (apparently skipping explicit encoding makes decode() work without ignore flag).

@asmeurer
Copy link
Member

Oh so I guess this is the same as #139. So I have encountered this before :)

@jrioux
Copy link
Member

jrioux commented Apr 9, 2013

So how about writing 'ignore' directly in the call to decode() instead of defining the global _decode_error_action and then let's merge this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants