This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: using rsync with Win32/UNC pathnames?

On Apr 14 11:30, Tomasz Chmielewski wrote:
> Corinna Vinschen schrieb:
>> On Apr 12 13:15, Tomasz Chmielewski wrote:
>>> Corinna Vinschen schrieb:
>>>> What's the wchar hex code value of that character?
>>> Hmm, I don't know.
>>> Is there some obvious way to get it?
>> You could write a small application which does nothing but calling
>> FindFirstFileW/FindNextFileW and print the found file names as hex
>> values.
> ...which sounds much more complicated than just copying the file to another 
> machine.

I don't do remote debugging.  If you want this fixed, find a method to
provide the file as zip attachment to this mailing list.  Or, cd to the
directory in which the file is stored and run the below application.  It
builds OOTB if you have gcc installed.  Just call `gcc -o foo foo.c'.

============ foo.c ==================
#include <windows.h>
#include <stdio.h>

  WIN32_FIND_DATAW data;
  HANDLE h = FindFirstFileW (L".\\*", &data);
	char buf[512];
	BOOL used;

	int ret = WideCharToMultiByte (GetACP (), 0, data.cFileName, -1,
				       buf, 512, NULL, &used);
	if (!ret)
	  printf ("<not converted>: ");
	  printf ("%s (%d): ", buf, used);
	for (w = data.cFileName; *w; ++w)
	  printf ("%04x ", *w);
	puts ("");
    while (FindNextFileW (h, &data));
  return 0;
============ foo.c ==================


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]