1. TortoiseHg
  2. TortoiseHg
  3. thg
  4. Issues
Issue #2383 wontfix

Don't change filenames to unicode for renames

Andreas Tscharner
created an issue

In the thg workbench, the filenames are all encoded as unicode, so they are displayed correctly. I had a problem with files that were converted from SVN. SVN stores the filenames as UTF-8 and the conversion did not change them. So after the conversion I had wrong filenames. I changed them to "correct" names again. But now in thg workbench, both name look the same (screen shot attached), and it is not clear what happened

Comments (3)

  1. Yuya Nishihara

    As we use Qt, unicode is inevitable.

    FWIW, if non-ascii filenames are not so many, maybe you can work around the problem by using --filemap. For example,

    % echo "rename 'ä.txt' '`echo -n ä.txt | iconv -f utf-8 -t iso-8859-1`'" > filemap
    % hg convert --filemap filemap <source> <dest>
    
  2. Yuya Nishihara

    Our implementation tries both utf-8 and the local encoding. In your case, the original filename is utf-8, and the new name is in local encoding, so they happen to be converted to the same unicode value.

    I don't think it's good to introduce extra complexity only to display corrupted filename.

  3. Log in to comment