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: How to determine actual character set

On 20 March 2011 20:15, Matthias Meyer wrote:
> I use cygwin 1.7.5 and run backups from Windoze to my Linux server by using
> BackupPC.
> I want to set the windows character set within the backuppc configuration
> for preventing me from this filename renamings (e.g. the german "Ã" will be
> replaced by "?")
> But how to determine the windows character set?

The "Windows character set", if there is such a thing, is UTF-16.
That's how files are encoded on disk with NTFS, and a backup program
better supports that.

> chcp will only deliver the code page (850 in one of my clients).

That's the console code page, which is set to the system's "OEM" code
page by default. These are the old DOS code pages.

> But I need something like "cp1252"

By which I guess you mean the system "ANSI" code page.

> Is there a program within cygwin which would resolve my pain ;-)

Not that I know of, but writing one is trivial:

#include <windows.h>
#include <stdio.h>

int main(void) {
  printf("%u\n", GetACP());
  return 0;


Problem reports:
Unsubscribe info:

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