I am using gfsneohellenic with mathastext package. Most of the things are working fine except when siunitx calls for cubed or squared options. For example, in the MWE appended below there is a strange symbol with capital A and a semicircle above it which is appended to the g/cm^3 unit.
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[default]{gfsneohellenic}
\usepackage[italic]{mathastext}
\usepackage{siunitx}
\begin{document}
Even interplanetary space is not entirely empty. But the density of the
matter in it is about \SI{5e-24}{\gram\per\cubic\centi\metre}.
The main component of interplanetary matter is atomic hydrogen. At the
present time, it is considered that cosmic space contains several
hydrogen atoms per \SI{1}{\gram\per\centi\metre\squared}.
\end{document}
If I use regular font the symbol disappears. What is happening? How can this be resolved?
Logfile gives this list
*File List*
article.cls 2014/09/29 v1.4h Standard LaTeX document class
size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
fontenc.sty
t1enc.def 2017/04/05 v2.0i Standard LaTeX file
gfsneohellenic.sty 2001/12/15 v1.0 Package `gfsneohellenic.sty'
lgrenc.def 2015/12/07 v0.13.1 LGR Greek font encoding definitions
greek-fontenc.def 2015/08/04 v0.13 Common Greek font encoding
definitions
mathastext.sty 2016/11/06 v1.3r Use the text font in math mode (JFB)
siunitx.sty 2017/05/19 v2.7g A comprehensive (SI) units package
expl3.sty 2017/05/13 L3 programming layer (loader)
expl3-code.tex 2017/05/13 L3 programming layer
l3pdfmode.def 2017/03/18 v L3 Experimental driver: PDF mode
xparse.sty 2017/05/13 L3 Experimental document command parser
amstext.sty 2000/06/29 v2.01 AMS text
amsgen.sty 1999/11/30 v2.0 generic functions
array.sty 2016/10/06 v2.4d Tabular extension package (FMi)
l3keys2e.sty 2017/05/13 LaTeX2e option processing using LaTeX3 keys
translator.sty 2010/06/12 ver 1.10
keyval.sty 2014/10/28 v1.15 key=value parser (DPC)
translator-language-mappings.tex
lgrcmr.fd 2016/03/04 v1.1 Greek European Computer Regular
t1neohellenic.fd
translator-basic-dictionary-English.dict
siunitx-abbreviations.cfg 2017/05/19 v2.7g siunitx: Abbreviated
units
omlneohellenic.fd
ot1neohellenic.fd
t1cmtt.fd 2014/09/29 v2.5h Standard LaTeX font definitions
***********
File output from xelatex
*File List*
article.cls 2014/09/29 v1.4h Standard LaTeX document class
size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
fontenc.sty
t1enc.def 2017/04/05 v2.0i Standard LaTeX file
t1lmr.fd 2009/10/30 v1.6 Font defs for Latin Modern
gfsneohellenic.sty 2001/12/15 v1.0 Package `gfsneohellenic.sty'
lgrenc.def 2015/12/07 v0.13.1 LGR Greek font encoding definitions
greek-fontenc.def 2015/08/04 v0.13 Common Greek font encoding
definitions
mathastext.sty 2016/11/06 v1.3r Use the text font in math mode (JFB)
siunitx.sty 2017/05/19 v2.7g A comprehensive (SI) units package
expl3.sty 2017/05/13 L3 programming layer (loader)
expl3-code.tex 2017/05/13 L3 programming layer
l3xdvipdfmx.def
xparse.sty 2017/05/13 L3 Experimental document command parser
amstext.sty 2000/06/29 v2.01 AMS text
amsgen.sty 1999/11/30 v2.0 generic functions
array.sty 2016/10/06 v2.4d Tabular extension package (FMi)
l3keys2e.sty 2017/05/13 LaTeX2e option processing using LaTeX3 keys
translator.sty 2010/06/12 ver 1.10
keyval.sty 2014/10/28 v1.15 key=value parser (DPC)
translator-language-mappings.tex
lgrcmr.fd 2016/03/04 v1.1 Greek European Computer Regular
t1neohellenic.fd
translator-basic-dictionary-English.dict
siunitx-abbreviations.cfg 2017/05/19 v2.7g siunitx: Abbreviated
units
omlneohellenic.fd
ot1neohellenic.fd
t1lmtt.fd 2009/10/30 v1.6 Font defs for Latin Modern
***********
Update: I upgraded to MacTeX 2018, but the problem still persists. Here is the file list for the 2018 compilation
*File List*
article.cls 2014/09/29 v1.4h Standard LaTeX document class
size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
fontenc.sty
t1enc.def 2017/04/05 v2.0i Standard LaTeX file
t1lmr.fd 2009/10/30 v1.6 Font defs for Latin Modern
gfsneohellenic.sty 2001/12/15 v1.0 Package `gfsneohellenic.sty'
lgrenc.def 2015/12/07 v0.13.1 LGR Greek font encoding definitions
greek-fontenc.def 2015/08/04 v0.13 Common Greek font encoding
definitions
mathastext.sty 2016/11/06 v1.3r Use the text font in math mode (JFB)
siunitx.sty 2018-03-20 v2.7m A comprehensive (SI) units package
expl3.sty 2018/03/05 L3 programming layer (loader)
expl3-code.tex 2018/03/05 L3 programming layer
l3xdvipdfmx.def
xparse.sty 2018/02/21 L3 Experimental document command parser
amstext.sty 2000/06/29 v2.01 AMS text
amsgen.sty 1999/11/30 v2.0 generic functions
array.sty 2018/04/07 v2.4g Tabular extension package (FMi)
l3keys2e.sty 2018/02/21 LaTeX2e option processing using LaTeX3 keys
translator.sty 2018/01/04 v1.12 Easy translation of strings in LaTeX
keyval.sty 2014/10/28 v1.15 key=value parser (DPC)
lgrcmr.fd 2017/07/29 v1.2 Greek European Computer Regular
t1neohellenic.fd
translator-basic-dictionary-English.dict
siunitx-abbreviations.cfg 2017/11/26 v2.7k siunitx: Abbreviated units
omlneohellenic.fd
ot1neohellenic.fd
t1lmtt.fd 2009/10/30 v1.6 Font defs for Latin Modern
***********
Update: Solved! As suggested by jfbu I copy pasted from MWE here back to texshop and the problem was solved. I had copy pasted the original text from a pdf which had an extra character at the end of these two entries. Somehow texshop did not show these, but pasting it in a plain texteditor showed these two extra characters as blocks.

\listfilesdo preamble and report the*File List*as found in log file? – Jun 04 '18 at 06:28xelatexat my locale. – Jun 04 '18 at 06:31mathastexthas no Greek related activity (without specific options) but it has an influence on math alphabets. Thus the only advice coming to mind (as I can't reproduce) is to try thedefaultalphabetsoption. – Jun 04 '18 at 06:38\listfilesto the preamble, the log file will contain a list of all used packages with version numbers and dates, which can help in debugging. – Jun 04 '18 at 06:40\listfilesto the very top of your document and post the output of the*File List*at the end of the.logfile? – moewe Jun 04 '18 at 07:20siunitxand theexpl3/l3...packages as well aslgrcmr.fd. It is not impossible that there was asiunitxincompatibility/bug that was fixed. Can you install MacTeX 2018 (you don't need to uninstall MacTeX 2017 and can switch between the two using a handy app - I forgot its name, but it should be pre-installed). – moewe Jun 04 '18 at 07:40l3xdvipdfmx.def, but your file list hasl3pdfmode.def 2017/03/18 v L3 Experimental driver: PDF mode. Can you try using the command line to issuexelatex yourfile.texand report if it changes anything to output. – Jun 04 '18 at 08:05.logfile of a pdfLaTeX run with a fully updated system on a plaintext paste site such as https://pastebin.com/? Maybe that helps to uncover what is going on. – moewe Jun 04 '18 at 11:162018/03/05(from their github repo) so the only remaining difference in the file list isarray.sty 2018/04/30 v2.4hwhich is a bit newer than yours. I still can't reproduce. Ah ok I see you new comment. Your original buffer must have some encoding problem. The extra character in PDF is in T1 encoding the one at slot position 128. I understood mathastext is required in your document, the question was whether it was requierd to display the problem, which you still don't say. – Jun 04 '18 at 12:35