# Wrong codes for "phi" and "varphi" in ASCIIMathML #353

Closed
opened this issue Nov 16, 2012 · 9 comments

Projects
None yet
3 participants

### ghost commented Nov 16, 2012

 it seems that the Unicode characters for "phi" and "varphi" in ASCIIMathML are wrong (inverted): "phi" uses "\u03C6" instead of "\u03D5" "varphi" uses "\u03D5" instead of "\u03C6"
Contributor

### fred-wang commented Nov 16, 2012

 I have not checked, but I think varphi and phi are reverted in LaTeX and MathML. So probably ASCIIMathML follows the MathML convention, here.

### PaulTopping commented Nov 16, 2012

 Unicode got it wrong in an early version and corrected it in a later version. Obviously this creates all kinds of problems since there are fonts and other implementations that still contain the old, wrong Unicode assignments. In fact, my guess is that they outnumber the ones that have it right. A total mess! If you search online for “phi varphi Unicode”, you can see a lot of mentions of the problem.
Member

### dpvc commented Nov 19, 2012

 The AsciiMath translation is done via an actual copy of AsciiMathML.js, and so this is the choice that Peter Jipsen made in writing AsciiMath originally. That may, as Paul suggests, have been due to the early incorrect Unicode mapping, and it has never been updated. You can, however, add configuration to your page that will switch the values. If you add:   to the page somewhere before the script that loads MathJax.js itself, that should change the two character codes for you.
Author

### ghost commented Nov 27, 2012

 I think I will adopt that solution. Thank you very much.

Member

### dpvc commented Nov 27, 2012

 I'm reopening the issue because I am thinking about whether to fix it in the next release.

### dpvc pushed a commit to dpvc/MathJax that referenced this issue Feb 14, 2014

 Allow switching of phi and varphi (new fixphi configuration parameter… 
… controls this). Resolves issue mathjax#353.
 8c0f844 

Member

### dpvc commented Feb 14, 2014

 I have added a configuration parameter that allows you to switch these two unicode values. It is on by default, so phi and varphi should produce the same results as LaTeX's \phi and \varphi.

### dpvc pushed a commit to dpvc/MathJax that referenced this issue Feb 15, 2014

 Merge branch 'issue353' into develop. Issue mathjax#353. 
 7313af1 

Member

### dpvc commented Feb 15, 2014

 => Merged.

Author

### ghost commented Apr 1, 2014

 Thank you very much!

Closed

### dpvc pushed a commit to dpvc/MathJax that referenced this issue Apr 21, 2014

 Take fixphi into account when fixing the phi and varphi characters. I… 
…ssue mathjax#353.
 2b9b405 

### dpvc pushed a commit to dpvc/MathJax that referenced this issue Apr 21, 2014

 Merge branch 'issue353' into develop. Issue mathjax#353. 
 5d75c5d 

### dpvc pushed a commit to mathjax/MathJax-test that referenced this issue Apr 21, 2014

 Add test for issue mathjax/MathJax#353. 
 9f53e40 
Member

### dpvc commented Apr 21, 2014

 => In Test Suite. AsciiMath/issue353.html

Closed