laptop and a wrench

漏洞

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.

上次发布: August 17, 2021 ArcGIS for Desktop
漏洞 ID 编号 NIM093452
已提交July 26, 2013
上次修改时间June 5, 2024
适用范围ArcGIS for Desktop
找到的版本10.1
操作系统Windows OS
操作系统版本7
状态Known Limit

附加信息

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

解决办法

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

重现步骤

漏洞 ID: NIM093452

软件:

  • ArcGIS for Desktop

当漏洞状态发生变化时获得通知

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项