punkshell_module_punk::encmime - mime encodings related subset of tcllib mime
This is a workaround package to provide the mime encoding names used in tcllib's mime package - without additional dependencies
tcllib mime loads either Trf or tcl::memchan functions. punk::encmime needs to work in a context where tcllib may not yet be loaded/available, and even these few dependencies are too much.
MAINTENANCE NOTE: The data in this module needs to be checked against the latest tcllib mime package
taken from tcllib mime version: 1.7.2 in 2024
overview of punk::encmime
Where practical - the actual tcllib mime package should be used instead.
This set of encoding related functions is a snapshot of the data from the mime package - and may not be up to date.
This pseudo-package was created to minimize dependencies for punk::char and punk::overtype
Core API functions for punk::encmime
maps tcl encodings onto the proper names for their MIME charset type.
This is only done for encodings whose charset types were known.
The remaining encodings return {} for now.
NOTE: consider using tcllib's mime::mapencoding instead if mime package available
mime::reversemapencodings maps MIME charset types onto tcl encoding names.
Returns the tcl encoding name for the specified mime charset, or {} if none is known
Arguments:
The MIME charset to convert into a tcl encoding type.
NOTE: consider using tcllib's mime::reversemapencoding instead if mime package available
Internal functions that are not part of the API
Copyright © 2024