Ticket Change Details
Not logged in
Overview

Artifact ID: 47b749e8c864b63e993e6bacc7258a890da47dbb
Ticket: 13b73889641e1b6c4f7ff9af23106e7034bb648c
Commit comments with multi-byte character break
User & Date: anonymous 2011-02-13 14:59:35
Changes

  1. comment changed to:
    I use windows command line prompt cmd to commit changes with command 
    <code>"fossil commit -m "修正问题。"</code>, and then use command <code>"fossil ui"</code> to view the commitment. And find chaos of comments, only after chosing the web page encoding to GBK and the comments seem OK.
    I had try following modify and it works fine.
    <pre>
    src/checkin.c 
    ========================================
    @@ -740,9 +740,11 @@
       blob_appendf(pOut, "Z %b\n", &mcksum);
       if( pnFBcard ) *pnFBcard = nFBcard;
     }
     
    -
    +#if defined(_WIN32)
    +extern char *sqlite3_win32_mbcs_to_utf8(const char*);
    +#endif
     /*
     ** COMMAND: ci
     ** COMMAND: commit
     **
    @@ -970,8 +972,16 @@
         if( blob_str(&ans)[0]!='y' ){
           fossil_exit(1);
         }
       }else{
    +#if defined(_WIN32)
    +    char *zConvertComment = sqlite3_win32_mbcs_to_utf8(blob_str(&comment));
    +    if (zConvertComment){
    +      blob_reset(&comment);
    +      blob_append(&comment, zConvertComment, -1);
    +      free(zConvertComment);
    +    }
    +#endif
         db_multi_exec("REPLACE INTO vvar VALUES('ci-comment',%B)", &comment);
         db_end_transaction(0);
         db_begin_transaction();
       }
    </pre>
    
  2. foundin changed to: "e7b6434112"
  3. private_contact changed to: "baf689df8a76164ce22b94c9dfd8eeb3a13e6730"
  4. severity changed to: "Minor"
  5. status changed to: "Open"
  6. title changed to: "Commit comments with multi-byte character break"
  7. type changed to: "Feature_Request"