laptop and a wrench

Bug

The Python Replace statement in the Field Calculator does not accept umlauts, Ä, ä, Ö, ö, Ü, ü, and ß in ArcGIS 10.1 service pack (SP) 1 and ArcGIS 10.2. However, all of these umlauts are accepted in ArcGIS Desktop 10.0 service pack (SP) 2.

Last Published: August 17, 2021 ArcGIS for Desktop
Bug ID Number NIM093452
SubmittedJuly 26, 2013
Last ModifiedJune 5, 2024
Applies toArcGIS for Desktop
Version found10.1
Operating SystemWindows OS
Operating System Version7
StatusKnown Limit

Additional Information

Python's two string literals (set by wrapping a string using single quotes (') or double quotes (")) are expected to contain ASCII encodings, so to declare the replacement argument as a Unicode string (which supports umlaut), do the following: `!ttt!.replace( "O", u"Ö")`.

Workaround

This workflow can be performed using the VBScript replace tool, e.g. replace([TEST], "statement", "<umlaut>").

To replace multiple umlauts in a single field, for example. to remove all instances of difference umlauts, string multiple replace functions together in the pre-script logic window using VBS:

pre-logic script code:

dim f1, f2, f3, f4, f5

f1 = Replace([TEST], "A", "Ä")

f2 = Replace(f1, "O", "Ö")

f3 = Replace(f2, "U", "Ü")

f4 = Replace(f3, "B", "ß")

f5 = Replace(f4, "a", "ä")

test = 

f5

Steps to Reproduce

Bug ID: NIM093452

Software:

  • ArcGIS for Desktop

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options