public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* How to determine actual character set
@ 2011-03-20 20:51 Matthias Meyer
  2011-03-21 12:55 ` Andy Koppe
  0 siblings, 1 reply; 2+ messages in thread
From: Matthias Meyer @ 2011-03-20 20:51 UTC (permalink / raw)
  To: cygwin

Hi,

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?
chcp will only deliver the code page (850 in one of my clients).
But I need something like "cp1252"

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

br
Matthias
-- 
Don't Panic


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How to determine actual character set
  2011-03-20 20:51 How to determine actual character set Matthias Meyer
@ 2011-03-21 12:55 ` Andy Koppe
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Koppe @ 2011-03-21 12:55 UTC (permalink / raw)
  To: cygwin

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;
}

Andy

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-03-21 12:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-20 20:51 How to determine actual character set Matthias Meyer
2011-03-21 12:55 ` Andy Koppe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).