Work-around for windows-platforms

getSystemEncoding will always return "ASCII" on windows. If you know a replacement for langinfo.h on windows, please tell me.

darcs-hash:20070813123558-a4fee-ec2f0f39494b005f8ae30fa7f0c2862cfa77695d
This commit is contained in:
Henning Guenther 2007-08-13 05:35:58 -07:00
parent b989f15063
commit f069504db0
2 changed files with 6 additions and 0 deletions

View File

@ -1,5 +1,9 @@
#include "system_encoding.h"
char* get_system_encoding() {
#if !defined(mingw32_HOST_OS) && !defined(__MINGW32__)
return nl_langinfo(CODESET);
#else
return "ASCII";
#endif
}

View File

@ -1,7 +1,9 @@
#ifndef __SYSTEM_ENCODING__
#define __SYSTEM_ENCODING__
#if !defined(mingw32_HOST_OS) && !defined(__MINGW32__)
#include <langinfo.h>
#endif
char* get_system_encoding();