binmode not needed if we always output bytes - #938
Conversation
|
Fixes #926 for latexmlc |
|
well, almost. A certain path through latexmlc still has wide characters as a serialization never gets utf-8 encoded. Which is why I was wondering if we shouldn't put the encode call already in The current |
|
Added a commit that should handle things with the current approach. |
|
The thing that got us in trouble was the inconsistency: one rare case being already encoded when most other stuff was characters. I'd prefer to keep things as consistent and localized as possible. So, I'm less inclined to change Core::Document's approach. But you're right that latexmlc has to deal with a variety of objects and we need a way to know (or use polymorphism) whether each object is encoded or not. |
|
Wouldn't a convention that any |
|
The other type of object that latexmlc can return are archives, and that is just binary data, so it follows the |
|
Oh, I just merged, but probably would like to request a comment to the effect of method is always bytes (similar to what I added in latexml/math, perhaps?) |
Simple enough (now that we have a proper understanding), all result prints expect bytes now, i.e. the result to be printed has already been utf-8 encoded.