scp and cygwin randomly and automatically converts text files from utf-8 to windows encoding (cp1251)
Wed Sep 1 05:18:00 GMT 2010
On 31 August 2010 20:23, rPman wrote:
> It happens when files are copied from cygwin windows machines to any linux
> (tried different versions of ubuntu and gentoo with utf-8 locale).
Cygwin does not change the encoding of file content when copying
files. Cygwin 1.7 does translate file names between the UTF-16
encoding used by Windows and the encoding you have configured in
Cygwin via the LC_ALL, LC_CTYPE or LANG variables.
Please try to desribe in more detail what you were trying to do and
how it went wrong. Also, what version of Cygwin are you using?
> As it is not possible to understand in what cases are re-encoding, sometimes
> enough to add one blank line in a text file that, when the transfer encoding
> has not happened. Just changing the format of a newline (in the source files
> are unix-style \n, but on the linux machine has come to win-style \r\n)
Line endings are a separate issue from character encodings. By
default, directories are mounted in binary mode, where file content is
left alone. Alternatively, they can be mounted in text mode, were line
endings are automatically translated between Windows and Unix style.
See http://www.cygwin.com/cygwin-ug-net/using-textbinary.html for lots
more on that.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin