View Ticket
Not logged in
Ticket UUID: cadc9aa78f754439d14325655756cafebeddc3e4
Title: convert comment between utf8 and big5 on windows
Status: Open Type: Feature_Request
Severity: Critical Priority:
Subsystem: Resolution: Open
Last Modified: 2012-12-03 21:15:25
Version Found In: 047e06193b
Description & Comments:
I'm a Taiwanese. I use linux,windows. On linux, the default coding locale is zh_TW.utf-8. It works well for fossil. But on windows, the default command line code page is 'cp950'(big5). So, if I write comment, I must call my comment editor 'notepad2' to force write out utf8 comment. The utf8 comment display well on 'fossil ui' web page. But, on cmd console which windows provide, it can only display big5.

So, I suggest on windows, fossil should convert code page when display comment and check-in comment.

I think this issue should also happen on check Chinese file name.


anonymous added on 2011-04-17 23:45:18 UTC:
use the void WINAPI SetFileApisTo[OEM|ANSI](void); when using commandline under windows http://msdn.microsoft.com/en-us/library/aa365534%28v=VS.85%29.aspx But as usual with windows it is much more complicated! The above page is confusing! using ansi,oem and utf and I don't know if utf equals ansi

A simple solution is to set the EDITOR variable or fossil editor setting to use notepad2 or to the editor you use for your programming and don't use the -m option when committing


anonymous claiming to be BM added on 2011-04-18 09:17:04 UTC:
You can use chcp 65001 in your console before you use fossil, and use a Unicode fixed-size font like Consolas, which will display your comments properly.


anonymous added on 2011-04-18 13:50:15 UTC:
I've tried chcp 65001 and choose font solution. But, it will causes three problems.

  1. Ugly output. It often display a part of Chinese sentences.
  2. Can not input Chinese on code page 65001.
  3. Can not run batch file on code page 65001.

I've try to found solution from git/mercurial check in log, but failed. I guess, the solution may hidden on tortoiseSvn, tortoiseHG or tortoiseGit.


anonymous claiming to be dlin added on 2011-04-18 13:55:04 UTC:
I forgot to mention. Even chcp to 65001, fossil can NOT handle Chinese file name. I can not add/remove Chinese file name. Especially, if the Chinese BIG5 code contains '\', the fossil will treat the Chinese char as a '?'. And then it can not found the correct file.


anonymous claiming to be dlin added on 2011-04-24 13:49:08 UTC:
This problem maybe could use the same method which may solve [490b6c2edd]


jan.nijtmans added on 2012-10-22 07:52:58 UTC:
Proposed solution can be found in branch "use-utf8-in-win-external-editor"