C++ Strings Interpreted As Fallback Characters
I am using TGX v4.16.0. All of the work I describe with is with the TGX simulator in MSVS.
I am building native C++ strings from C character arrays. I am then taking these strings and using them to update a single wildcard text area. Most of the text is displayed correctly but some of the characters are interpreted as the fallback character (?). I am using a standard English language font. The characters that trigger the fallback character are in the range of A - Z. I have verified that the C++ string is being built correctly and that the wildcard buffer is big enough to hold the string.
Here is a part of the code and the result.
Initialization of the text area:
m_mfgInfo.setWildcard(m_mfgInfoBuf);
m_mfgInfo.setTypedText(touchgfx::TypedText(T_MFG_INFO));
m_mfgInfo.setXY(150, 150);
m_mfgInfo.resizeToCurrentText();
add(m_mfgInfo);Update of the text area:
void MyView::SetData(MyData_t& data)
{
Unicode::strncpy(m_mfgInfoBuf, data.mfgInfo->c_str(),
static_cast<uint16_t>(data.mfgInfo.length()));
m_mfgInfo.resizeToCurrentText();
m_mfgInfo.invalidate();
}Result:
I have verified that if I replace the characters that trigger the wildcard with "P", that the string is displayed without the wildcards.
I am at a loss as to how to explain this. Any help would be greatly appreciated.
