[mapguide-users] extended characters with .NET
darren.karasiuk at aldatasoftware.com
Wed Mar 11 18:49:41 EDT 2009
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: http://n2.nabble.com/extended-characters-with-.NET-tp2464283p2464283.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
More information about the mapguide-users