Erik, Karsten:
Thanks for your useful feedback. Please see my suggestions at the end.
Answers to your questions:
Erik:
> Did you try other directories that are in $PATH?
Ok, that helped a lot. Adding my directory to $PATH fixed the problem. I was trying to hard-code the path (per some Linux examples).
Karsten:
> Why not simply "textconv = iconv -f utf-16 -t utf-8", without the extra script?
Following Erik's $PATH suggestion, I got that working too.
Hard-coding the path doesn't work: "C:\\Program Files\\GnuWin32\\bin\\iconv -f utf-16 -t utf-8" returns:
C:\Program Files\GnuWin32\bin\iconv -f utf-16 -t utf-8: C:Program: command not found
fatal: unable to read files to diff
That's a DOS command parsing error. Enclosing the path in quotes should fix that, but it doesn't. Not a big issue, since $PATH works.
Still, that removes the need for a separate script.
> ... I would try to use a clean/smudge filter
> (i.e. store UTF-16 files as UTF-8 in the repository ...
An even nicer solution! Now that $path is fixed, I put the following into ~\Git\etc\gitconfig:
[filter "winutf16"]
clean = iconv -f utf-16 -t utf-8
smudge = iconv -f utf-8 -t utf-16
required
And, updated my local .gitattributes:
*.txt filter=winutf16
Now, no need for the diff filter! Looks good so far in Git Extensions. I'll test further to confirm.
> There's also an 'encoding' attribute and a 'gui.encoding' setting
> which
in theory should solve your issue (i.e. specify encoding
> of files for
display by GUI tools). I don't know if Git Extensions
> supports that, or
whether its supposed to work for binary files
> at all.
I will try that out soon.
==============================
Suggestions:
Unless the 'encoding' attribute works, could I suggest the following?
1) Include iconv in the Windows distribution of msysGit
2) Add something like the "winutf16" filter to ~\Git\etc\gitconfig
That, and posting a question/answer to Stack Overflow should largely cover this problem, until a comprehensive solution is implemented.
Thanks,
-Ken