Skip to content
Tcl Source Code Changes To Encoding Loading
Login

Changes To Encoding Loading

Changes to "Encoding Loading" between 2014-09-12 18:32:39 and 2014-09-12 18:33:14

︙
30
31
32
33
34
35
36
37

38
39
40
41
42
43
44
30
31
32
33
34
35
36

37
38
39
40
41
42
43
44







-
+







This module includes the code that goes out and searches the <b>encoding dirs</b>
search path to find <i>*.enc</i> files that holds data to define additional encodings.

The circularity problem is that both querying a file system and reading data in from
a file potentially make use of encodings, and might run aground if they need an
encoding that's not already available.

The way out of this dilemma come in several parts, some already in place.  First,
The way out of this dilemma comes in several parts, some already in place.  First,
we make sure that handling of the <b>utf-8</b> encoding is built-in to Tcl, with
no need to bring data in from a file first.  That's the foundation of the bootstrap.
Then we define that all <i>*.enc</i> files must be stored in the <b>utf-8</b>
encoding.  This relieves all concern about the channel read operation.

We still have to query the filesystem.  Here is where Tcl's virtual filesystem architecture
holds the key.  Each Tcl_Filesystem can define a <b>Tcl_FSCreateInternalRepProc</b>
︙