03-20-2014 11:40 AM
Hi,
This may sound a bit unusual, but probably someone already did this.
Is there any way to show the description or name of a character that was just typed in the String control?
So for example, if I type " ", the description is "<space>", and if I type "," then the description is "comma".
Yes, I can build this through a case structure on my own, but if it's possible to fetch from some existing database (like the Char mapping), then it's better. Because on my own, I may miss some character and after all, it's a lengthy process.
Thanks and Regards,
Solved! Go to Solution.
03-20-2014 02:02 PM - edited 03-20-2014 02:06 PM
Hi Vaibhav,
use a lookup table with the U8 value of the char as pointer into the table.
You can create that "table" as 1D array of strings - which is much easier to create when using a usual text editor to create a txt file and reading the file using ReadSpreadsheetFile…
03-21-2014 05:29 AM
03-21-2014 02:23 PM
Hi GerdW and MC,
Thanks.
I found my complete table on the http://www.theasciicode.com.ar/ page.
It's a pity I cannot use the UNICODE characters in LabVIEW, alongwith other simple characters. I must change the whole text's font to Symbol, for example to use Greek letters in between other text controls (like Enum or String or Tree View), as I asked in another thread. That would have been really good.
Regards,
03-21-2014 02:45 PM
Be careful what ASCII table you use. The extended characters (decimal 128 and above) can vary.
Here is a different table that I would say is much more commonly used. http://www.cheat-sheets.org/saved-copy/ascii_a4.pdf and matches what is showing up on my PC.
03-21-2014 03:33 PM
Hi,
Thanks. Already saved.
Actually, I used that page that I mentioned only because of the readily available descriptions. Will update the list with more time at hand, and use the more reliable source.