#pragma once
#ifdef _WIN32
#include <sys/types.h>
#include <string>
#else
#include <fcntl.h>
#include <stdio.h>
#include <sys/stat.h>
#include <unistd.h>
#endif
namespace android {
namespace base {
#ifdef _WIN32
bool WideToUTF8(const wchar_t* utf16, const size_t size, std::string* utf8);
bool WideToUTF8(const wchar_t* utf16, std::string* utf8);
bool WideToUTF8(const std::wstring& utf16, std::string* utf8);
bool UTF8ToWide(const char* utf8, const size_t size, std::wstring* utf16);
bool UTF8ToWide(const char* utf8, std::wstring* utf16);
bool UTF8ToWide(const std::string& utf8, std::wstring* utf16);
bool UTF8PathToWindowsLongPath(const char* utf8, std::wstring* utf16);
#endif
namespace utf8 {
#ifdef _WIN32
FILE* fopen(const char* name, const char* mode);
int mkdir(const char* name, mode_t mode);
int open(const char* name, int flags, ...);
int unlink(const char* name);
#else
using ::fopen;
using ::mkdir;
using ::open;
using ::unlink;
#endif
} } }