View Ticket
Not logged in
Ticket UUID: 13b73889641e1b6c4f7ff9af23106e7034bb648c
Title: Commit comments with multi-byte character break
Status: Open Type: Code_Defect
Severity: Minor Priority:
Subsystem: Resolution: Open
Last Modified: 2012-10-22 08:00:09
Version Found In: e7b6434112
Description & Comments:
I use windows command line prompt cmd to commit changes with command "fossil commit -m "修正问题。", and then use command "fossil ui" 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.
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(); }


jan.nijtmans added on 2012-10-22 08:00:09 UTC:
should be fixed in version 1.24