delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/04/14/06:48:13

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Mon, 14 Apr 2008 12:47:44 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: using rsync with Win32/UNC pathnames?
Message-ID: <20080414104744.GR23852@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20080411141809 DOT GJ23852 AT calimero DOT vinschen DOT de> <47FF8C1F DOT 5070309 AT wpkg DOT org> <20080411162234 DOT GS23852 AT calimero DOT vinschen DOT de> <47FF9A97 DOT 3090804 AT wpkg DOT org> <20080412082628 DOT GY23852 AT calimero DOT vinschen DOT de> <480088A7 DOT 4010106 AT wpkg DOT org> <20080412110031 DOT GA17933 AT calimero DOT vinschen DOT de> <480099B6 DOT 8000406 AT wpkg DOT org> <20080414092051 DOT GL23852 AT calimero DOT vinschen DOT de> <48032429 DOT 5040402 AT wpkg DOT org>
MIME-Version: 1.0
In-Reply-To: <48032429.5040402@wpkg.org>
User-Agent: Mutt/1.5.16 (2007-06-09)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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>

int
main()
{
  WIN32_FIND_DATAW data;
  HANDLE h = FindFirstFileW (L".\\*", &data);
  if (h != INVALID_HANDLE_VALUE)
    do
      {
	char buf[512];
	BOOL used;
	PWCHAR w;

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


Corinna

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

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019