summaryrefslogtreecommitdiffstats
path: root/generic/tclEncoding.c
Commit message (Collapse)AuthorAgeFilesLines
* Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-021-2/+0
|\ | | | | more harm than good. Purged them.
| * Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-011-2/+0
| | | | | | more harm than good. Purged them.
| * (Backport) Fix [Bug 2891556] and improve test to detect similar ↵ferrieux2009-11-161-6/+22
| | | | | | | | manifestations in the future.
| * UtfToUtfProc: Avoid unwanted sign extension when converting incomplete UTF-8jenglish2008-07-041-3/+3
| | | | | | | | sequences. See [Bug 1908443] for details.
| * * generic/tclEncoding.c (EscapeFromUtfProc): Applied patchandreas_kupries2007-02-121-3/+15
| | | | | | | | | | | | | | | | | | supplied by Mo DeJong to fix [Bug 1516109]. Backport from Tcl 8.5. Mo's description: Clear the TCL_ENCODING_END flag when end bytes are written. This fix keep this method from writing escape bytes for an encoding like iso2022-jp multiple times when the escape byte overlap with the end of the IO buffer. * tests/io.test: Add test case for escape byte overlap case.
| * (UnicodeToUtfProc): dst must be set to (ch & 0xFF) to work on big endian systemshobbs2006-10-061-2/+2
| |
| * * generic/tcl.h: note limitation on changing Tcl_UniChar sizehobbs2006-10-051-24/+35
| | | | | | | | | | | | * generic/tclEncoding.c (UtfToUnicodeProc, UnicodeToUtfProc): * tests/encoding.test (encoding-16.1): fix alignment issues in unicode <> utf conversion procs. [Bug 1122671]
| * * generic/tclEncoding.c: Replace buffer copy in for loopdgp2006-08-091-4/+2
| | | | | | | | with call to memcpy(). Thanks to afredd. [Patch 1530262]
| * * generic/tclIO.c (ReadChars): Added check and panic andandreas_kupries2006-04-051-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commentary to a piece of code which relies on BUFFER_PADDING to create enough space at the beginning of each buffer forthe insertion of partial multi-byte data at the beginning of a buffer. To explain why this code is ok, and as precaution if someone twiddled the BUFFER_PADDING into uselessness. * generic/tclIO.c (ReadChars): [SF Tcl Bug 1462248]. Added code temporarily suppress the use of TCL_ENCODING_END set when eof was reached while the buffer we are converting is not truly the last buffer in the queue. together with the Utf bug below it was possible to completely bollox the buffer data structures, eventually crashing Tcl. * generic/tclEncoding.c (UtfToUtfProc): Fixed problem where the function accessed memory beyond the end of the input buffer. When TCL_ENCODING_END is set and the last bytes of the buffer start a multi-byte sequence. This bug contributed to [SF Tcl Bug 1462248].
| * * generic/tclEncoding.c: Report error when an escape encodingdgp2006-03-131-5/+24
| | | | | | | | is missing one of its sub-encodings [Bug 506653].
| * * generic/tclIOUtil.c (TclFSNormalizeAbsolutePath): make statichobbs2005-10-051-4/+4
| | | | | | | | * generic/tclEncoding.c (TclFindEncodings): make static
| * * generic/tclCmdAH.c New "encoding" Tcl_ObjType (not registered)dgp2005-07-051-1/+89
| | | | | | | | | | | | | | * generic/tclEncoding.c that permits longer lifetimes of the * generic/tclInt.h Tcl_Encoding values kept as intreps of Tcl_Obj's. Reduces the need for repeated reading of encoding definition files from the filesystem. [Bug 1077262]
| * * generic/tclEncoding.c (TableFromUtfProc): correct crashhobbs2004-11-121-2/+13
| | | | | | | | condition when TCL_UTF_MAX == 6. [Bug 1004065]
| * * generic/tclEncoding.c:rmax2004-05-271-5/+131
| | | | | | | | | | | | * tests/encoding.test: added support and tests for translating embedded null characters between real nullbytes and the internal representation on input/output (Bug #949905).
| * * generic/tclEncoding.c: Added FreeEncoding(systemEncoding) indavygrvy2004-05-061-1/+2
| | | | | | | | | | TclFinalizeEncodingSubsystem because its ref count was incremented in TclInitEncodingSubsystem.
| * * generic/tclInt.h:hobbs2004-03-291-19/+34
| | | | | | | | | | | | | | | | | | * generic/tclEncoding.c (TclFindEncodings, Tcl_FindExecutable): * mac/tclMacInit.c (TclpInitLibraryPath): Correct handling of UTF * unix/tclUnixInit.c (TclpInitLibraryPath): data that is actually * win/tclWinFile.c (TclpFindExecutable): "clean", allowing the * win/tclWinInit.c (TclpInitLibraryPath): loading of Tcl from paths that contain multi-byte chars on Windows [Bug 920667]
| * * tests/unixInit.test (unixInit-2.10): mark as knownBughobbs2003-11-061-13/+7
| | | | | | | | | | | | * generic/tclEncoding.c (TclFindEncodings): revert patch from 2003-11-05. It wasn't valid in the sensitive startup init phase and broke Windows from working at all.
| * * generic/tclEncoding.c (TclFindEncodings): Normalize the pathdgp2003-11-051-5/+9
| | | | | | | | | | | | of the executable before passing to TclpInitLibraryPath() to avoid buggy handling of paths containing "..". [Bug 832657] * tests/unixInit.test (unixInit-2.10): New test for fixed bug.
* | Fix [Bug 2891556] and improve test to detect similar manifestations in the ↵ferrieux2009-11-161-6/+22
| | | | | | | | future.
* | UtfToUtfProc: Avoid unwanted sign extension when converting incomplete UTF-8jenglish2008-07-041-2/+2
| | | | | | | | sequences. See [Bug 1908443] for details.
* | * generic/tclEncoding.c (LoadEscapeEncoding): avoid leaking escapedas2008-03-111-4/+9
| | | | | | | | | | sub-encodings, fixes encoding-11.1 failing after iso2022-jp loaded (e.g. TESTFLAGS='-singleproc 1 -match "chan-io-1.8 encoding-11.1"').
* | merge stable branch onto HEADdgp2007-12-131-1/+1
| |
* | * generic/tclEncoding.c: Version of the embedded iso8859-1Miguel Sofer2007-11-061-13/+210
| | | | | | | | | | | | | | | | encoding handler that is faster (functions to do the encoding know exactly what they're doing instead of pulling it from a table, though the table itself has to be retained for use by shift encodings that depend on iso8859-1.) [Patch 1826906], committing for dkf.
* | Embed the definition of the iso8859-1 encoding directly in Tcl.dkf2007-10-281-2/+46
| |
* | Eliminate use of (VOID*) casts when calling memset or memcpy.dkf2007-04-171-9/+7
| |
* | Don't use C++ keywordsdkf2007-04-101-4/+4
| |
* | Handle creation of Tcl_Objs from constant strings better (easier to use, moredkf2007-04-101-3/+4
| | | | | | | | efficient). After [Patch 1529526] (afredd)
* | * generic/tclEncoding.c (EscapeFromUtfProc):mdejong2006-12-271-3/+14
| | | | | | | | | | | | | | | | | | | | | | Clear the TCL_ENCODING_END flag when end bytes are written. This fix keep this method from writing escape bytes for an encoding like iso2022-jp multiple times when the escape byte overlap with the end of the IO buffer. * tests/io.test: Add test for escape byte overlap issue.
* | * generic/tclCompExpr.c: fix gcc warnings about 'cast to/fromdas2006-11-131-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclEncoding.c: pointer from/to integer of different * generic/tclEvent.c: size' on 64-bit platforms by casting to * generic/tclExecute.c: intermediate types intptr_t/uintptr_t * generic/tclHash.c: via new PTR2INT(), INT2PTR(), * generic/tclIO.c: PTR2UINT() and UINT2PTR() macros. * generic/tclInt.h: [Patch 1592791] * generic/tclProc.c: * generic/tclTest.c: * generic/tclThreadStorage.c: * generic/tclTimer.c: * generic/tclUtil.c: * unix/configure.in: * unix/tclUnixChan.c: * unix/tclUnixPipe.c: * unix/tclUnixPort.h: * unix/tclUnixTest.c: * unix/tclUnixThrd.c: * unix/configure: autoconf-2.59 * unix/tclConfig.h.in: autoheader-2.59
* | Fix some comments, make selected if/while bodies clearer by inserting comments.dkf2006-11-021-9/+11
| |
* | Reverted tclEncoding.c commits that caused crashes and failures all overdgp2006-11-021-123/+128
| | | | | | | | the place.
* | Make better use of the core's internal macros.dkf2006-11-021-89/+96
| |
* | Removed unnecessary casts and reworked some loops for more clarity.dkf2006-11-021-40/+28
| |
* | (UnicodeToUtfProc): dst must be set to (ch & 0xFF) to work on big endian systemshobbs2006-10-061-2/+2
| |
* | * generic/tcl.h: note limitation on changing Tcl_UniChar sizehobbs2006-10-051-26/+34
| | | | | | | | | | | | * generic/tclEncoding.c (UtfToUnicodeProc, UnicodeToUtfProc): * tests/encoding.test (encoding-16.1): fix alignment issues in unicode <> utf conversion procs. [Bug 1122671]
* | TIP 27 changes for Tcl_CreateEncodingKevin B Kenny2006-09-261-2/+2
| |
* | * generic/tclEncoding.c: Replace buffer copy in for loopdgp2006-08-091-4/+2
| | | | | | | | with call to memcpy(). Thanks to afredd. [Patch 1530262]
* | * generic/tclIO.c (ReadChars): Added check and panic andandreas_kupries2006-04-051-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commentary to a piece of code which relies on BUFFER_PADDING to create enough space at the beginning of each buffer forthe insertion of partial multi-byte data at the beginning of a buffer. To explain why this code is ok, and as precaution if someone twiddled the BUFFER_PADDING into uselessness. * generic/tclIO.c (ReadChars): [SF Tcl Bug 1462248]. Added code temporarily suppress the use of TCL_ENCODING_END set when eof was reached while the buffer we are converting is not truly the last buffer in the queue. together with the Utf bug below it was possible to completely bollox the buffer data structures, eventually crashing Tcl. * generic/tclEncoding.c (UtfToUtfProc): Fixed problem where the function accessed memory beyond the end of the input buffer. When TCL_ENCODING_END is set and the last bytes of the buffer start a multi-byte sequence. This bug contributed to [SF Tcl Bug 1462248].
* | revert most recent tclEncoding.c commit. It is suspected to havedgp2006-03-241-22/+6
| | | | | | | | produced a huge slowdown in encoding.test on Windows.
* | * generic/tclEncoding.c: Report error when an escape encodingdgp2006-03-131-6/+22
| | | | | | | | is missing one of its sub-encodings [Bug 506653].
* | TIP#258 IMPLEMENTATIONdgp2006-02-081-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/Encoding.3: New subcommand [encoding dirs]. * doc/encoding.n: New routine Tcl_GetEncodingNameFromEnvironment. * generic/tcl.decls: Made public: * generic/tclBasic.c: TclGetEncodingFromObj * generic/tclCmdAH.c: -> Tcl_GetEncodingFromObj * generic/tclEncoding.c:TclGetEncodingSearchPath * generic/tclInt.decls: -> Tcl_GetEncodingSearchPath * generic/tclInt.h: TclSetEncodingSearchPath * generic/tclTest.c: -> Tcl_SetEncodingSearchPath * library/init.tcl: Removed commands: * tests/cmdAH.test: [tcl::unsupported::EncodingDirs] * tests/encoding.test: [testencoding path] (Tcltest) * unix/tclUnixInit.c: [Patch 1413934]. * win/tclWinInit.c: * generic/tclDecls.h: make genstubs * generic/tclIntDecls.h: * generic/tclStubInit.c:
* | ANSIfy function declarations and definitionsdkf2005-10-181-399/+384
| |
* | * unix/tclUnixSock.c (InitializeHostName): Synchronized use ofandreas_kupries2005-09-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | static modifier in declaration and definition of function. * unix/tclUnixChan.c (FileTruncateProc): Synchronized use of static modifier in declaration and definition of function. * generic/tclResult.c (ReleaseKeys): Synchronized use of static modifier in declaration and definition of function. * generic/tclListObj.c (NewListIntRep): Synchronized use of static modifier in declaration and definition of function. * generic/tclEncoding.c (InitializeEncodingSearchPath): Synchronized use of static modifier in declaration and definition of function. * generic/tclEncoding.c (FillEncodingFileMap): Synchronized use of static modifier in declaration and definition of function. * generic/tclIORChan.c (RcNewHandle): Synchronized use of static modifier in declaration and definition of function.
* | Getting more systematic about styledkf2005-07-171-447/+520
| |
* | Merged kennykb-numerics-branch back to the head; TIPs 132 and 232Kevin B Kenny2005-05-101-1/+1
| |
* | * generic/tclInterp.c: Corrected bad syntax of Tcl_Panic() call.dgp2005-04-121-119/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclUtil.c (TclGetProcessGlobalValue): More robust handling of bad TclInitProcessGlobalValueProc behavior; an immediate panic rather than a mysterious crash later. * generic/tclEncoding.c: Several changes to the way the encodingFileMap cache is maintained. Previously, it was attempted to keep the file map filled and up to date with changes in the encoding search path. This contributed to slow startup times since it required an expensive "glob" operation to fill the cache. Now the validity of items in the cache are checked at the time they are used, so the cache is permitted to fall out of sync with the encoding search path. Only [encoding names] and Tcl_GetEncodingNames() now pay the full expense. [Bug 1177363]
* | * generic/tclInt.h (TclGetEncodingFromObj): New function todgp2005-04-081-1/+87
| | | | | | | | | | | | | | | | | | * generic/tclEncoding.c (TclGetEncodingFromObj): retrieve a Tcl_Encoding value, as well as cache it in the internal rep of a new "encoding" Tcl_ObjType. * generic/tclCmdAH.c (Tcl_EncodingObjCmd): Updated to call new function so that Tcl_Encoding's used by [encoding convert*] routines are not freed too quickly. [Bug 1077262]
* | * generic/tclEncoding.c: Plugged some memory leaks. Thanks todgp2004-12-131-2/+3
| | | | | | | | * generic/tclUtil.c: Rolf Ade for reports and testing [Bug 1083082]
* | * generic/tclEncoding.c: Different fix for [Bug 1077005].dgp2004-12-041-2/+2
| | | | | | | | | | | | | | | | | | * generic/tclEvent.c: Broke apart TclpSetInitialEncodings() on * generic/tclInt.h: Windows into TclpSetInterfaces(), that is * unix/tclUnixInit.c: fundamentally essential, and the initialization * win/tclWinInit.c: of the system encoding, which is not. Made the TclpSetInterfaces call part of TclInitSubsystems so it cannot be overlooked.
* | * generic/tclUtil.c (TclSetProcessGlobalValue): Handle the casedgp2004-12-021-3/+3
| | | | | | | | | | | | | | | | where a ProcessGlobalValue might be assigned to itself. * generic/tclEncoding.c (MakeFileMap): Correct refcounting errors managing values returned by TclPathPart (with refCount of 1!) that led to a memory leak. [Bug 1077474].