Jack Williams 6ee67f63e1 Icu and codecvt 2 (#88)
* Support for Windows codecvt and icu4c

* Add dependency for Travis

* Update README

* Fix codecvt build for linux

* Fix linux builds

* Fix copyright
2019-09-16 20:59:24 -04:00

23 lines
442 B
C++

#pragma once
#include <string>
#include <sstream>
#ifdef USE_ICU4C
#include <unicode/unistr.h>
typedef std::basic_string<UChar> UCharString;
#else
typedef std::u16string UCharString;
#endif
namespace peparse {
template <class T>
static std::string to_string(T t, std::ios_base &(*f)(std::ios_base &) ) {
std::ostringstream oss;
oss << f << t;
return oss.str();
}
std::string from_utf16(const UCharString &u);
} // namespace peparse