text encoding and a picture

Hi Guys,
hopefully an easy one.
I have a string which is UTF-8 encoded, it is a foreign language. It looks fine in the IDE when I view the contents of the string i.e. ??? ?? ??? .
However, when I do

pn.Graphics.DrawString s , 0, 0

all the encoding are stripped and viewing pn just shows [][][][][][][][][][][][][] ( solid rectangle )

Any ideas?

I have tried pn.Graphics.DrawString convertencodings( s , encodings.utf8 ) , 0, 0 which has the same result.


g.font is not set and does not contain the unicode characters to display the glyphs required, which is why you are seeing blocks. you can use Charmap on windows to see if a font supports the Devanagari alphabet (aka Sanskrit)

Not all fonts support all character glyphs

I believe Arial supports semetic and eastern characters…

For incoming data from databases, files, sockets, etc. you use DefineEncoding, for all outgoing data to databases, files, etc. you use ConvertEncoding.