How to use the pyglossary.text_utils.fixUtf8 function in pyglossary

To help you get started, we’ve selected a few pyglossary examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ilius / pyglossary / pyglossary / glossary.py View on Github external
def setInfo(self, key: str, value: str) -> None:
		#  FIXME
		origKey = key
		key = fixUtf8(key)
		value = fixUtf8(value)

		try:
			key = self.infoKeysAliasDict[key.lower()]
		except KeyError:
			pass

		if origKey != key:
			log.debug("setInfo: %s -> %s", origKey, key)

		self._info[key] = value
github ilius / pyglossary / pyglossary / glossary.py View on Github external
def setInfo(self, key: str, value: str) -> None:
		#  FIXME
		origKey = key
		key = fixUtf8(key)
		value = fixUtf8(value)

		try:
			key = self.infoKeysAliasDict[key.lower()]
		except KeyError:
			pass

		if origKey != key:
			log.debug("setInfo: %s -> %s", origKey, key)

		self._info[key] = value
github ilius / pyglossary / pyglossary / entry_filters.py View on Github external
def run(self, entry: BaseEntry) -> Optional[BaseEntry]:
		entry.editFuncWord(fixUtf8)
		entry.editFuncDefi(fixUtf8)
		return entry
github ilius / pyglossary / pyglossary / entry_filters.py View on Github external
def run(self, entry: BaseEntry) -> Optional[BaseEntry]:
		entry.editFuncWord(fixUtf8)
		entry.editFuncDefi(fixUtf8)
		return entry