MCPcopy Create free account
hub / github.com/clips/pattern / find_codec

Method find_codec

pattern/web/soup/BeautifulSoup.py:1935–1939  ·  view source on GitHub ↗
(self, charset)

Source from the content-addressed store, hash-verified

1933
1934
1935 def find_codec(self, charset):
1936 return self._codec(self.CHARSET_ALIASES.get(charset, charset)) \
1937 or (charset and self._codec(charset.replace("-", ""))) \
1938 or (charset and self._codec(charset.replace("-", "_"))) \
1939 or charset
1940
1941 def _codec(self, charset):
1942 if not charset: return charset

Callers 1

_convertFromMethod · 0.95

Calls 2

_codecMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected