Tcl Source Code

Check-in [557645d373]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:
* generic/tclEncoding.c: Use "iso8859-1" and not "identity" as the default and original [encoding system] value. Since "iso8859-1" is built in to the C source code for Tcl now, there's no availability issue, and it has the good feature of "identity" that we must have ("bytes in" == "bytes out") without the bad feature of "identity" ("broken as designed") that makes us want to abandon it. [RFE 2008609] *** POTENTIAL INCOMPATIBILITY for older releases of Tclkit and any other code expecting a particular value for Tcl's default system encoding ***
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | potential incompatibility
Files: files | file ages | folders
SHA1: 557645d3733ee17a26c78e37bfd3f09e9f8202d0
User & Date: dgp 2008-10-27 19:08:53
Context
2008-10-28
23:29
CONSTify TclDTraceInfo Eliminate some -Wstrings-write warnings check-in: f5c4b2c4b3 user: nijtmans tags: trunk
2008-10-27
19:08
* generic/tclEncoding.c: Use "iso8859-1" and not "identity" as the default an...
check-in: 557645d373 user: dgp tags: trunk, potential incompatibility
2008-10-26
18:50
Style improvements - invoking callbacks without visual junk. check-in: 4a9936c5ad user: dkf tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.














1
2
3
4
5
6
7












2008-10-24  Pat Thoyts  <[email protected]>

	* library/http/http.tcl: Fixed a failure to read SHOUTcast streams
	with the new 2.7 package. Introduced a new intial state as the
	first response may not be HTTP*.

2008-10-23  Miguel Sofer  <[email protected]>
>
>
>
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
2008-10-27  Don Porter  <[email protected]>

	* generic/tclEncoding.c:	Use "iso8859-1" and not "identity"
	as the default and original [encoding system] value.  Since
	"iso8859-1" is built in to the C source code for Tcl now, there's no
	availability issue, and it has the good feature of "identity" that
	we must have ("bytes in" == "bytes out") without the bad feature of
	"identity" ("broken as designed") that makes us want to abandon it.
	[RFE 2008609]
	*** POTENTIAL INCOMPATIBILITY for older releases of Tclkit and
	any other code expecting a particular value for Tcl's default
	system encoding ***

2008-10-24  Pat Thoyts  <[email protected]>

	* library/http/http.tcl: Fixed a failure to read SHOUTcast streams
	with the new 2.7 package. Introduced a new intial state as the
	first response may not be HTTP*.

2008-10-23  Miguel Sofer  <[email protected]>

Changes to generic/tclEncoding.c.

4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
...
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
...
622
623
624
625
626
627
628
629

630
631
632
633
634
635
636
 *	Contains the implementation of the encoding conversion package.
 *
 * Copyright (c) 1996-1998 Sun Microsystems, Inc.
 *
 * See the file "license.terms" for information on usage and redistribution of
 * this file, and for a DISCLAIMER OF ALL WARRANTIES.
 *
 * RCS: @(#) $Id: tclEncoding.c,v 1.64 2008/10/26 18:34:04 dkf Exp $
 */

#include "tclInt.h"

typedef size_t (LengthProc)(const char *src);

/*
................................................................................

    type.encodingName	= "identity";
    type.toUtfProc	= BinaryProc;
    type.fromUtfProc	= BinaryProc;
    type.freeProc	= NULL;
    type.nullSize	= 1;
    type.clientData	= NULL;

    defaultEncoding	= Tcl_CreateEncoding(&type);
    systemEncoding	= Tcl_GetEncoding(NULL, type.encodingName);

    type.encodingName	= "utf-8";
    type.toUtfProc	= UtfExtToUtfIntProc;
    type.fromUtfProc	= UtfIntToUtfExtProc;
    type.freeProc	= NULL;
    type.nullSize	= 1;
    type.clientData	= NULL;
................................................................................

	type.encodingName	= "iso8859-1";
	type.toUtfProc		= Iso88591ToUtfProc;
	type.fromUtfProc	= Iso88591FromUtfProc;
	type.freeProc		= TableFreeProc;
	type.nullSize		= 1;
	type.clientData		= dataPtr;
	Tcl_CreateEncoding(&type);

    }

    encodingsInitialized = 1;
}
 
/*
 *----------------------------------------------------------------------






|







 







<
|
<







 







|
>







4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
...
561
562
563
564
565
566
567

568

569
570
571
572
573
574
575
...
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
 *	Contains the implementation of the encoding conversion package.
 *
 * Copyright (c) 1996-1998 Sun Microsystems, Inc.
 *
 * See the file "license.terms" for information on usage and redistribution of
 * this file, and for a DISCLAIMER OF ALL WARRANTIES.
 *
 * RCS: @(#) $Id: tclEncoding.c,v 1.65 2008/10/27 19:08:53 dgp Exp $
 */

#include "tclInt.h"

typedef size_t (LengthProc)(const char *src);

/*
................................................................................

    type.encodingName	= "identity";
    type.toUtfProc	= BinaryProc;
    type.fromUtfProc	= BinaryProc;
    type.freeProc	= NULL;
    type.nullSize	= 1;
    type.clientData	= NULL;

    Tcl_CreateEncoding(&type);


    type.encodingName	= "utf-8";
    type.toUtfProc	= UtfExtToUtfIntProc;
    type.fromUtfProc	= UtfIntToUtfExtProc;
    type.freeProc	= NULL;
    type.nullSize	= 1;
    type.clientData	= NULL;
................................................................................

	type.encodingName	= "iso8859-1";
	type.toUtfProc		= Iso88591ToUtfProc;
	type.fromUtfProc	= Iso88591FromUtfProc;
	type.freeProc		= TableFreeProc;
	type.nullSize		= 1;
	type.clientData		= dataPtr;
	defaultEncoding	= Tcl_CreateEncoding(&type);
	systemEncoding	= Tcl_GetEncoding(NULL, type.encodingName);
    }

    encodingsInitialized = 1;
}
 
/*
 *----------------------------------------------------------------------