Pass **kwargs through Form functions so rendering has access to a CharacterEncoding option set, e.g. in ToString#1749
Pass **kwargs through Form functions so rendering has access to a CharacterEncoding option set, e.g. in ToString#1749
**kwargs through Form functions so rendering has access to a CharacterEncoding option set, e.g. in ToString#1749Conversation
|
Noticed in trying to understand what's up with #1735 |
938f1a2 to
fbfee4e
Compare
|
One thing observed in this PR... I had hoped that with these changes, we could remove setting Because symbols can appear in error messages that reside outside of the |
|
@rocky, again, I think CharacterEncoding is not a parameter used by Notice that MakeBoxes uses the operator Now I set another encoding, and do the same: Notice that internally, Besides, since internally MakeBoxes does not look into the encoding, the resulting Box expressions are considered equal, even the strings obtained from rendering are different. |
|
Also, So the same happens when |
I should have made it clear earlier that I agree with that. That's not what's going on here. There is no code inside this PR or elsewhere in This PR addresses the issue that certain built-in functions, such as Setting an optional encoding parameter, I suspect, is the most natural way for As we have seen too many times, yes, there are numerous bugs. Mathics3/Mathics3-scanner#166 was opened and fixed as a result of investigating this issue. The changes here, do not change the behavior of any of the examples you give, either to fix them or, as far as I can tell, to make it harder to fix. What this PR addresses is what was reported initially:
I don't see any of the other stuff is related to this. I am not seeing how these changes preclude others that fix those other bugs. |
Notice that ToString calls |
Right. And what we saw in #1735 is that a conversion in there had already taken place via a prior rendering through a Form format. This corrects that problem so that in #1735 the "unconversion" is not needed.
I am not 100% sure that this is exactly what's missing. I suspect a bit of #1735, however, is needed |
|
Again, in WMA neither Format or Makeboxes takes that argument, for the reason I tried to explain before. The problem right now is that ToString in master is not taking the CharacterEncoding parameter. I will try to go over this tomorrow. |
This PR does not add a user-settable parameter in any The encoding parameter exists only at
And it does with this PR :-)
Sure. There may be another approach or solution. We should discuss and pick the best one. |
**kwargs through Form functions so rendering has access to any CharacterEncoding option set
**kwargs through Form functions so rendering has access to any CharacterEncoding option set**kwargs through Form functions so rendering has access to any CharacterEncoding option set
**kwargs through Form functions so rendering has access to any CharacterEncoding option set**kwargs through Form functions so rendering has access to a CharacterEncoding option set, e.g. in ToString
Also, add CharacterEncoding="ASCII" in test helper
In particular, add examples with the CharacterEncoding option.
due to a character code page problem
300b9e5 to
8ccf13b
Compare
Also, add CharacterEncoding="ASCII" in the test helper
Makes
ToString[x >= b, CharacterEncoding="ASCII"]not convert>=to Unicode.