Skip to content
Tcl Source Code History Of Ticket 217987ffffffffff
Login

History Of Ticket 217987ffffffffff

Artifacts Associated With Ticket 217987ffffffffff

  1. Ticket change [27d7be1088] (rid 88592) by nobody on 2000-10-26 00:47:11:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 6162 Bug
      Version: 8.3.2
      SubmitDate: '2000-08-23'
      LastModified: '2000-09-05'
      Severity: MED
      Status: Closed
      Submitter: techsupp
      ChangedBy: hobbs
      RelatedBugIDs: 6166
      OS: Windows NT
      FixedDate: '2000-09-05'
      ClosedDate: '2000-10-25'
      
      
      Name:
      
      Benjamin Riefenstahl
      
      
      
      CVS:
      
      tclUtf.c,v 1.11 2000/01/11 22:09:00 hobbs Exp
      
      
      
      Comments:
      
      The patch is against the tcl-8.3.3 branch.
      
      
      
      ReproducibleScript:
      
      puts \ä
      
      
      
      ObservedBehavior:
      
      The script above displays garbage.
      
      
      
      DesiredBehavior:
      
      The script above should produce one line with an "ä".
      
      
      
      Patch:
      
      Index: tclUtf.c
      
      ===================================================================
      
      RCS file: /cvsroot/tcl/generic/tclUtf.c,v
      
      retrieving revision 1.11
      
      diff -c -r1.11 tclUtf.c
      
      *** tclUtf.c2000/01/11 22:09:001.11
      
      --- tclUtf.c2000/08/23 18:54:26
      
      ***************
      
      *** 781,787 ****
      
         * backslash sequence. */
      
        {
      
            register CONST char *p = src+1;
      
      !     int result, count, n;
      
            char buf[TCL_UTF_MAX];
      
        
      
            if (dst == NULL) {
      
      --- 781,787 ----
      
         * backslash sequence. */
      
        {
      
            register CONST char *p = src+1;
      
      !     int result, count, n, utfconvert;
      
            char buf[TCL_UTF_MAX];
      
        
      
            if (dst == NULL) {
      
      ***************
      
      *** 789,794 ****
      
      --- 789,795 ----
      
            }
      
        
      
            count = 2;
      
      +     utfconvert = 0;
      
            switch (*p) {
      
        /*
      
                 * Note: in the conversions below, use absolute values (e.g.,
      
      ***************
      
      *** 823,828 ****
      
      --- 824,830 ----
      
                    if (isxdigit(UCHAR(p[1]))) { /* INTL: digit */
      
                        char *end;
      
        
      
      + utfconvert = 1;
      
                        result = (unsigned char) strtoul(p+1, &end, 16);
      
                        count = end - src;
      
                    } else {
      
      ***************
      
      *** 831,836 ****
      
      --- 833,839 ----
      
                    }
      
                    break;
      
        case 'u':
      
      +     utfconvert = 1;
      
            result = 0;
      
            for (count = 0; count < 4; count++) {
      
        p++;
      
      ***************
      
      *** 868,873 ****
      
      --- 871,877 ----
      
             * Check for an octal number \oo?o?
      
             */
      
            if (isdigit(UCHAR(*p)) && (UCHAR(*p) < '8')) { /* INTL: digit */
      
      + utfconvert = 1;
      
        result = (unsigned char)(*p - '0');
      
        p++;
      
        if (!isdigit(UCHAR(*p)) || (UCHAR(*p) >= '8')) { /* INTL: digit */
      
      ***************
      
      *** 891,897 ****
      
            if (readPtr != NULL) {
      
        *readPtr = count;
      
            }
      
      !     return Tcl_UniCharToUtf(result, dst);
      
        }
      
        
      
        /*
      
      --- 895,906 ----
      
            if (readPtr != NULL) {
      
        *readPtr = count;
      
            }
      
      !     if (!utfconvert) {
      
      ! *dst = (char) result;
      
      ! return 1;
      
      !     } else {
      
      ! return Tcl_UniCharToUtf(result, dst);
      
      !     }
      
        }
      
        
      
        /*
      
      
      
      PatchFiles:
      
      tclUtf.c
      
      
      
      
      
      
      
    4. foundin initialized to: "obsolete: 8.3.2"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "69. Other"
    10. title initialized to:
      Backslash substitution is broken with non-ASCII chars
      
    11. type initialized to: "Bug"
  2. Ticket change [eed3f65cbe] (rid 108886) by welch on 2000-10-26 08:12:10:

    1. closedate changed to: "2000-10-26T01:12:10"
    2. closer changed to: "welch"
    3. priority changed to: "2"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"
  3. Ticket change [9b34d8e573] (rid 111089) by cc_benny on 2001-01-29 23:47:35:

    1. icomment:
      The Problem still exists in 8.4 in CVS, and it doesn't seem to be fixed in the 8.3.2 branch either ??.
      
      I attach a patch against the main branch in CVS here:
      
      Index: tclUtf.c
      ===================================================================
      RCS file: /cvsroot/tcl/tcl/generic/tclUtf.c,v
      retrieving revision 1.14
      diff -c -r1.14 tclUtf.c
      *** tclUtf.c2000/06/05 23:36:211.14
      --- tclUtf.c2001/01/29 16:46:49
      ***************
      *** 781,787 ****
         * backslash sequence. */
        {
            register CONST char *p = src+1;
      !     int result, count, n;
            char buf[TCL_UTF_MAX];
        
            if (dst == NULL) {
      --- 781,787 ----
         * backslash sequence. */
        {
            register CONST char *p = src+1;
      !     int result, count, n, utfconvert;
            char buf[TCL_UTF_MAX];
        
            if (dst == NULL) {
      ***************
      *** 789,794 ****
      --- 789,795 ----
            }
        
            count = 2;
      +     utfconvert = 0; /*false*/
            switch (*p) {
        /*
                 * Note: in the conversions below, use absolute values (e.g.,
      ***************
      *** 820,825 ****
      --- 821,827 ----
                    result = 0xb;
                    break;
                case 'x':
      +     utfconvert = 1; /*true*/
                    if (isxdigit(UCHAR(p[1]))) { /* INTL: digit */
                        char *end;
        
      ***************
      *** 831,836 ****
      --- 833,839 ----
                    }
                    break;
        case 'u':
      +     utfconvert = 1; /*true*/
            result = 0;
            for (count = 0; count < 4; count++) {
        p++;
      ***************
      *** 868,873 ****
      --- 871,877 ----
             * Check for an octal number \oo?o?
             */
            if (isdigit(UCHAR(*p)) && (UCHAR(*p) < '8')) { /* INTL: digit */
      +         utfconvert = 1; /*true*/
        result = (unsigned char)(*p - '0');
        p++;
        if (!isdigit(UCHAR(*p)) || (UCHAR(*p) >= '8')) { /* INTL: digit */
      ***************
      *** 891,897 ****
            if (readPtr != NULL) {
        *readPtr = count;
            }
      !     return Tcl_UniCharToUtf(result, dst);
        }
        
        /*
      --- 895,909 ----
            if (readPtr != NULL) {
        *readPtr = count;
            }
      !     if (!utfconvert)
      !     {
      ! *dst = (char)result;
      !         return 1;
      !     }
      !     else
      !     {
      ! return Tcl_UniCharToUtf(result, dst);
      !     }
        }
        
        /*
      
      
      
      
      
    2. login: "cc_benny"
    3. mimetype: "text/plain"
    4. username: "cc_benny"
  4. Ticket change [14c3f92d25] (rid 124454) by dgp on 2001-04-14 03:21:33:

    1. closedate changed to: "2001-04-13T20:21:33"
    2. closer changed to: "dgp"
    3. subsystem changed to: "44. UTF-8 Strings"
  5. Ticket change [37adf77236] (rid 112071) by hobbs on 2001-06-20 13:31:55:

    1. assignee changed to: "hobbs"
    2. icomment:
      Logged In: YES 
      user_id=72656
      
      Not sure why this got closed, but it is still a valid bug 
      in 8.3.3/8.4a2.
      
      
    3. login: "hobbs"
    4. mimetype: "text/plain"
    5. status changed to: "Open"
    6. username: "hobbs"
  6. Ticket change [626f2d969b] (rid 92405) by hobbs on 2001-06-28 08:06:55:

    1. closedate changed to: "2001-06-28T01:06:55"
    2. closer changed to: "hobbs"
    3. icomment:
      Logged In: YES 
      user_id=72656
      
      I solved this with a slightly cleaner patch that is 
      attached for 8.4a3cvs.
      
      
    4. login: "hobbs"
    5. mimetype: "text/plain"
    6. status changed to: "Closed"
    7. username: "hobbs"
  7. Add attachment "utf.patch" [dddb08b4ba] (rid 114749) by hobbs on 2001-06-28 08:06:55.

  8. Ticket change [e6b8cc842e] (rid 104340) by hobbs on 2001-06-28 08:06:56:

    1. icomment:
      
      
      File Added - 7876: utf.patch
      
      
      
    2. login: "hobbs"
    3. mimetype: "text/plain"
    4. username: "hobbs"