summaryrefslogtreecommitdiffstats
path: root/generic/tclEncoding.c
Commit message (Collapse)AuthorAgeFilesLines
* make some more internal tables CONSTjan.nijtmans2012-04-181-1/+1
| | | fix compilation with -DNO_CONST
* [Bug 3466099] BOM in Unicodejan.nijtmans2012-02-191-2/+2
|
* 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.
* * generic/tclEncoding.c (LoadTableEncoding):hobbs2003-02-211-1/+46
| | | | | | | | | * library/encoding/cp932.enc: Correct jis round-trip encoding * library/encoding/euc-jp.enc: by adding 'R' type to .enc files. * library/encoding/iso2022-jp.enc: [Patch #689341] (koboyasi, taguchi) * library/encoding/jis0208.enc: * library/encoding/shiftjis.enc: * tests/encoding.test:
* * generic/tclEncoding.c (TclFinalizeEncodingSubsystem): properlyhobbs2002-11-271-2/+4
| | | | cleanup all encodings by using Tcl_FirstHashEntry in the while loop.
* * generic/tclEncoding.c (UtfToUtfProc, UtfToUnicodeProc):hobbs2002-11-121-8/+26
| | | | | | | (TableFromUtfProc, EscapeFromUtfProc): Use TclUtfToUniChar. (UnicodeToUtfProc, TableToUtfProc): add 1-byte char optimizations for Tcl_UniCharToUtf call. These improve encoded channel conversion speeds by up to 20%.
* * generic/tclEncoding.c (EscapeFromUtfProc):hobbs2002-04-181-8/+22
| | | | | | * generic/tclIO.c (WriteChars, Tcl_Close): corrected the handling of outputting end escapes for escape-based encodings. [Bug #526524] (yamamoto)
* * generic/tclEncoding.c: Fix typo in comment.mdejong2002-03-111-2/+2
| | | | | | | | * generic/tclIO.c (DoReadChars, ReadBytes, ReadChars): Use NULL value instead of pointer set to NULL to make things more clear. Reorder arguments so that they match the function signatures. Cleanup little typos and add more descriptive comment.
* * tests/io.test:hobbs2002-03-041-16/+23
| | | | | | | | | * tests/encoding.test: corrected iso2022 encoding results. added encoding-24.* * generic/tclEncoding.c (EscapeFromUtfProc): corrected output of escape codes as per RFC 1468. [Patch #474358] (taguchi) (TclFinalizeEncodingSubsystem): corrected potential double-free when encodings were finalized on exit. [Bug #219314, #524674]
* * Partial TIP 27 rollback. Following routinesdgp2002-02-081-3/+3
| | | | | | | | | | | | | restored to return (char *): Tcl_DStringAppend, Tcl_DStringAppendElement, Tcl_JoinPath, Tcl_TranslateFileName, Tcl_ExternalToUtfDString, Tcl_UtfToExternalDString, Tcl_UniCharToUtfDString, Tcl_GetCwd, Tcl_WinTCharToUtf. Also restored Tcl_WinUtfToTChar to return (TCHAR *) and Tcl_UtfToUniCharDString to return (Tcl_UniChar *). Modified some callers. This change recognizes that Tcl_DStrings are de-facto white-box objects. * generic/tclCmdMZ.c: corrected use of C++-style comment.
* * Updated interfaces of generic/tclEncoding, generic/tclFilename.c,dgp2002-01-251-10/+10
| | | | | | | | | | | generic/tclIOUtil.c, generic/tclPipe.c, generic/tclResult.c, generic/tclUtil.c, generic/tclVar.c and mac/tclMacResource.c according to TIP 27. Tcl_TranslateFileName rewritten as wrapper around VFS-aware version. Updated callers. ***POTENTIAL INCOMPATIBILITY*** Includes source incompatibilities: argv arguments of Tcl_Concat, Tcl_JoinPath, Tcl_OpenCommandChannel, Tcl_Merge; argvPtr arguments of Tcl_SplitList and Tcl_SplitPath.
* * Updated APIs indgp2001-09-241-2/+2
| | | | | generic/tclUtil.c according to the guidelines of TIP 27. [Patch 464553]
* Changes from TIP#17 "Redo Tcl's filesystem"vincentdarley2001-07-311-17/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following files were impacted. * doc/Access.3: * doc/FileSystem.3: * doc/OpenFileChnl.3: * doc/file.n: * doc/glob.n: * generic/tcl.decls: * generic/tcl.h: * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclDate.c: * generic/tclDecls.h: * generic/tclEncoding.c: * generic/tclFCmd.c: * generic/tclFileName.c: * generic/tclGetDate.y: * generic/tclIO.c: * generic/tclIOCmd.c: * generic/tclIOUtil.c: * generic/tclInt.decls: * generic/tclInt.h: * generic/tclIntDecls.h: * generic/tclLoad.c: * generic/tclStubInit.c: * generic/tclTest.c: * generic/tclUtil.c: * library/init.tcl: * mac/tclMacFCmd.c: * mac/tclMacFile.c: * mac/tclMacInit.c: * mac/tclMacPort.h: * mac/tclMacResource.c: * mac/tclMacTime.c: * tests/cmdAH.test: * tests/event.test: * tests/fCmd.test: * tests/fileName.test: * tests/io.test: * tests/ioCmd.test: * tests/proc-old.test: * tests/registry.test: * tests/unixFCmd.test: * tests/winDde.test: * tests/winFCmd.test: * unix/mkLinks: * unix/tclUnixFCmd.c: * unix/tclUnixFile.c: * unix/tclUnixInit.c: * unix/tclUnixPipe.c: * win/tclWinFCmd.c: * win/tclWinFile.c: * win/tclWinInit.c: * win/tclWinPipe.c
* Fixing bug #119417 using patch #102496.andreas_kupries2000-12-081-10/+26
|
* * generic/tclCmdIL.c (InfoBodyCmd): made [info body] return ahobbs2000-01-211-3/+3
| | | | | | | | | | | string if the body has been bytecompiled. * generic/tclBasic.c (Tcl_EvalObjEx): added pedantic check for originating proc body of bytecompiled code, #def'd out as the change for [info body] should make it unnecessary * tests/set.test: added test for complex array elem name compiling * generic/tclCompCmds.c (TclCompileSetCmd): Fixed parsing of array elements during compiling, and slightly optimised same [Bug: 3889]
* * doc/glob.n:hobbs1999-12-121-2/+2
| | | | | | | | | | | | | | | | * tests/fileName.test: * generic/tclInt.decls: * generic/tclInt.h: * generic/tclIntDecls.h: * generic/tclStubInit.c: * generic/tclEncoding.c: * generic/tclFileName.c: * mac/tclMacFile.c: * unix/tclUnixFile.c: * win/tclWinFile.c: enhanced the glob command with the new options -types -path -directory and -join. Deprecated TclpMatchFiles with TclpMatchFilesTypes, extended TclGlob and TclDoGlob and added GlobTypeData structure.
* * generic/tcl.decls :redman1999-12-021-1/+83
| | | | | | | | | | | | | | * generic/tclMain.c : * unix/tclAppInit.c: * win/tclAppInit.c: Added two new internal functions, TclSetStartupScriptFileName() and TclGetStartupScriptFileName() and added hooks into the main() code for supporting TclPro and other "big" shells more easily without requiring a copy of the main() code. * generic/tclEncoding.c: * generic/tclEvent.c: Moved encoding-related startup code from tclEvent.c into the more appropriate tclEncoding.c.
* merged tcl 8.1 branch back into the main trunkstanton1999-04-161-0/+2685