I diffed (GNU diffutils) two “.rdp” files (UTF-16), and I falsely got the impression these utilities properly deal with Unicode

  • https://en.wikipedia.org/wiki/Remote_Desktop_Protocol — originally from the Windows world RDP “provides a user with a graphical interface to connect to another computer over a network connection
  • http://www.donkz.nl/files/rdpsettings.html — a(n) “.rdp” file keeps settings to start an RDP connection — because Emacs opens such files as text files, I had no idea they are not “classic” text files, instead (according to the GNU “file” command) they are “little-endian UTF-16 Unicode text, with CRLF, CR line terminators” (at least the ones created by Windows’ “Remote Desktop Connection” software; I converted one of them to plain ASCII, and even through this one Windows still  opened the connection properly)

My next “mistake” was to naively “diff” two “.rdp” files and to overcome some initial problem by passing “--text” to “diff“, and then “diff” showed exactly what I expected:

The respective work environment is Win7, and I am using GNU diffutils etc as part of Cygwin.


Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.