[mapguide-users] extended characters with .NET

Darren Karasiuk darren.karasiuk at aldatasoftware.com
Fri Mar 13 12:20:30 EDT 2009

Well, I'm still having trouble with getting characters above 127 to work
with .NET. I've tried using different fonts but the images don't appear on
the map. (-.-;)

I've searched for symbol resources but couldn't find any. Is there an easy
way of making a symbol without having MapGuide Enterprise?

-----Original Message-----
From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Aldata
Sent: March 11, 2009 4:50 PM
To: mapguide-users at lists.osgeo.org
Subject: [mapguide-users] extended characters with .NET

Hi everyone,
I have a problem with using extended characters with fonts.

When I create a layer with Autodesk Map Guide Studio and use a Wingdings
arrow as the point style, there is no problem.
I load the exported xml layer.definition in my .NET application, change the
filter, save the resource, and add the layer to the the map.  At this point,
the data loads and plots successfully, but the point style that is expected
to be an arrow, is now a picture of hand holding a pen, the equivalent of a
the question mark (?) in a normal text font.

I figure it's .NET converting the UTF-8 character into ASCII or UNICODE that
is trouble.  The Webdings font works fine up until character decimal 127.
After that, the hand holding a pen again.

I tried to use the notation & #xE9; (space added so webpage doesn't
interpret) but again, no go. I also tried the decimal version with no

How can I load, edit, and output layer.definition containing extended
characters using .NET?

What I have:
        Dim layerXMLDoc As XmlDocument = New XmlDocument()
        Dim XMLDocPath As String =
        Dim sr As New IO.StreamReader(XMLDocPath, System.Text.Encoding.UTF8)
Dim newLayer As MgLayer = add_layer_definition_to_map(layerXMLDoc.OuterXml,
"layer-eq" + EquipmentList.SelectedValue.ToString,

This function was more or less copied from the api documents which receives
the layerXMLDoc as the first parameter.  Is the problem with out it's

 Public Function add_layer_definition_to_map(ByVal layerDefinition As
String, ByVal layerName As String, ByVal layerLegendLabel As String) As
        'Validate the XML
        Dim XmlDoc As New XmlDocument
        'don't understand validation yet

        Dim encoding As New System.Text.ASCIIEncoding() ' Is the problem

        Dim byteSource As New

Thanks for your time!
View this message in context:
Sent from the MapGuide Users mailing list archive at Nabble.com.

mapguide-users mailing list
mapguide-users at lists.osgeo.org

More information about the mapguide-users mailing list