Problem displaying unicode characters in PhidgetTextLCD-.net

Supporting Visual Studio on Windows
alexannic

Problem displaying unicode characters in PhidgetTextLCD-.net

Postby alexannic » Wed Jan 21, 2009 11:51 am

Hello,

I am trying to code a simple program in Visual Studio 2008 (VB .net) which involves sending unicode characters to the PhidgetLCD interface kit.

Normal characters appear without any problems, however when I enter for example '\u0041' I get ¥u0041 (a Yen symbol and then the unicode number instead of the translated character).

Any ideas?

Thanks!
Alex

User avatar
Patrick
Lead Developer
Posts: 3078
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Postby Patrick » Wed Jan 21, 2009 12:30 pm

VB.NET string don't seem to support escaped characters. The ¥ symbol you are seeing is the character in the \ position of the TextLCDs character set.

To add a unicode character you would do this:

Code: Select all

phidgetLCD.rows(0).DisplayString = "Some char:" & Chr(&H41) & " tada.."


Note that the textlcd only accepts characters in the range 0x08 - 0xff, You can see the characters in the TextLCD manual - the character set is non standard above 127.

-Patrick


Return to “VB .NET”

Who is online

Users browsing this forum: No registered users and 1 guest