[ Main Table Of Contents | Table Of Contents | Keyword Index ]

punkshell_module_punk::encmime(0) 0.1.0 doc "mime encoding names and aliases"

Name

punkshell_module_punk::encmime - mime encodings related subset of tcllib mime

Table Of Contents

Synopsis

  • package require punk::encmime

Description

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

overview of punk::encmime

Concepts

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

dependencies

packages used by punk::encmime

  • Tcl 8.6-

API

Namespace punk::encmime

Core API functions for punk::encmime

mapencoding enc

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

reversemapencoding mimeType

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:

string mimeType

The MIME charset to convert into a tcl encoding type.

NOTE: consider using tcllib's mime::reversemapencoding instead if mime package available

Namespace punk::encmime::lib

Secondary functions that are part of the API

Internal

Namespace punk::encmime::system

Internal functions that are not part of the API

Keywords

encodings, module