From: pixar-oss Date: Fri, 12 Jan 2024 18:40:15 +0000 (-0800) Subject: Merge pull request #2890 from tylerm-nv/usdviewq-utf8-search X-Git-Tag: accepted/tizen/unified/x/20250428.070456~5^2~75 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=768ee984ab04e7fc73604569314945f2896ffbfb;p=platform%2Fcore%2Fuifw%2FOpenUSD.git Merge pull request #2890 from tylerm-nv/usdviewq-utf8-search UTF8 search support in usdviewq (Internal change: 2311157) --- 768ee984ab04e7fc73604569314945f2896ffbfb diff --cc pxr/usdImaging/usdviewq/appController.py index 6c01056ad,67e9a2ba0..e607e7f8e --- a/pxr/usdImaging/usdviewq/appController.py +++ b/pxr/usdImaging/usdviewq/appController.py @@@ -2204,6 -2203,13 +2204,13 @@@ class AppController(QtCore.QObject) # Prim/Attribute search functionality ===================================== - # Defaults to NFKC for ease of use for users. NFKC has a compatbility decomposition that NFC does not. - # This makes it much easier to search with just ASCII characters. - # Some information is lost with the additional decomposition, - # but it's intentional to enable simpler searching. ++ # Defaults to NFKC for ease of use for users. NFKC has a compatbility ++ # decomposition that NFC does not. This makes it much easier to search with ++ # just ASCII characters. Some information is lost with the additional ++ # decomposition, but it's intentional to enable simpler searching. + def _normalize_unicode(self, str: str, form = 'NFKC'): + return unicodedata.normalize(form, str) + def _isMatch(self, pattern, isRegex, prim, useDisplayName): """ Determines if the given prim has a name that matches the