laptop and a wrench

Error

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.

Última publicación: August 17, 2021 ArcGIS for Desktop
Número de ID del error NIM093452
EnviadoJuly 26, 2013
Última modificaciónJune 5, 2024
Relacionado conArcGIS for Desktop
Versión encontrada10.1
Sistema operativoWindows OS
Versión de sistema operativo7
EstadoKnown Limit

Información adicional

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"Ö")`.

Solución alternativa

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

Pasos para reproducir

ID del error: NIM093452

Software:

  • ArcGIS for Desktop

Recibir notificaciones cuando cambie el estado de un error

Descargar la aplicación de soporte de Esri

Descubrir más sobre este tema

Obtener ayuda de expertos en ArcGIS

Contactar con el soporte técnico

Descargar la aplicación de soporte de Esri

Ir a opciones de descarga