• We recently switched our forum platform. If you experience any issues please email support@crystalfontz.com

Character Map

Draw6

New member
I noticed that chars ~`[]{}\|@$^ are maped differently in the display than the std keybrd. So sending these keys directly to the display returns the wrong data. I noticed other LCD programs have problems with that .. but CC doesn't. Whats your secret? How'd you work around that?
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.
 

Draw6

New member
Edited:// I supose this shoulda went in da other forum ... Software that supports CF Displays. :)

I must be missing something ?

My code can detect and replace only the chars under 127. Any thing over that blanks the rest of the line out.

AnsiString TParserForm::ChangeBumCharacters(AnsiString inString)
{
AnsiString outString;
int inStringLength = inString.Length();

for(int i = 0; i < inStringLength; i++)
{
if(inString.IsDelimiter("{}|[]\\~@$^`", i))
{
AnsiString inSubString = inString.SubString(i,1);
char *a = inSubString.c_str();
AnsiString a2(a);
if(a2 =='`' )
{
char b = '\x027';
inString.Delete(i,1);
inString.Insert(b,i);
}
if(inSubString == '@')
{
char b = '\x07F';
//replaced with 127 as 160 dont work
inString.Delete(i,1);
inString.Insert(b,i);
}
}

}
outString = inString;
return outString;
}



void __fastcall TParserForm::Button1Click(TObject *Sender)
{
//testing the delimiters
AnsiString s = "test {}|[]\\~@$^` string";
AnsiString sShowThis = ChangeBumCharacters(s);
Label1->Caption = sShowThis;
lcdClearDisplay();

//shows chars up to 127 . after that the screen is blank
lcdSetCursorPos(0,0);
if(lcdSendString(sShowThis.c_str(),sShowThis.Length()));
//shows all windows chars even if wrong (original string)
lcdSetCursorPos(0,1);
if(lcdSendString(s.c_str(),s.Length()));

}
 
Last edited:
Top