English

Problem: Unicode characters display as question marks, 'garbled' or 'nonsense'

Description

Unicode characters display as question marks, 'garbled' or 'nonsense' text in some Windows Form Controls even though they are stored in a personal geodatabase and display perfectly in ArcGIS products.

[O-Image]

Cause

The Windows Form Control used to display the characters is not Unicode-enabled. This is known to happen in VB 6, VBA and VC++ 6.

Given that MessageBox is not Unicode-enabled, this VBA code may be used to reproduce the issue. Paste it in an ArcMap document and modify it as needed to work with your Unicode test data:

Code:
Sub Test()

Dim pMxDoc As IMxDocument
Dim pMap As IMap
Set pMxDoc = Application.Document
Set pMap = pMxDoc.FocusMap

Dim pFeatLayer As IFeatureLayer
Set pFeatLayer = pMap.Layer(0)

Dim pTable As ITable
Set pTable = pFeatLayer

Dim pRow As IRow
Set pRow = pTable.GetRow(1)

theUnicodeText = pRow.Value(2)
MsgBox "value= " & theUnicodeText

End Sub

Note:
The Windows Character Map tool, located in Start > Programs > Accessories > System Tools > Character Map, may be used to select and copy Unicode characters to the clipboard for pasting into the attribute table in edit mode.

Solution or Workaround

  1. Navigate to Start > Control Panel > Regional and Language Options.
  2. Click the Advanced tab.
  3. Select the appropriate language from the dropdown list under the 'Language for non-Unicode programs' section.

    [O-Image]
    The final result should look similar to the screenshot below:

    [O-Image]

Related Information