CppCMS
Classes | Typedefs | Functions
booster::nowide Namespace Reference

This namespace includes implementation of basic STL's / STDLIb's functions such that they accept UTF-8 strings. on Windows. Otherwise it is just an alias of std namespace (i.e. not on Windows) More...

Classes

class  bad_utf
 This exception is thrown if invalid UTF-8 or UTF-16 is given as input. More...
 
class  basic_filebuf
 
class  basic_filebuf< char >
 
class  basic_fstream
 
class  basic_ifstream
 
class  basic_ofstream
 

Typedefs

typedef basic_filebuf< char > filebuf
 
typedef basic_ifstream< char > ifstream
 
typedef basic_ofstream< char > ofstream
 
typedef basic_fstream< char > fstream
 

Functions

BOOSTER_API std::string convert (wchar_t const *s)
 
BOOSTER_API std::wstring convert (char const *s)
 
std::string convert (std::wstring const &s)
 
std::wstring convert (std::string const &s)
 
FILE * fopen (char const *file_name, char const *mode)
 
FILE * freopen (char const *file_name, char const *mode, FILE *stream)
 
int rename (char const *old_name, char const *new_name)
 
int remove (char const *name)
 

Detailed Description

This namespace includes implementation of basic STL's / STDLIb's functions such that they accept UTF-8 strings. on Windows. Otherwise it is just an alias of std namespace (i.e. not on Windows)

Typedef Documentation

Same as std::filebuf but accepts UTF-8 strings under Windows

Same as std::fstream but accepts UTF-8 strings under Windows

Same as std::ifstream but accepts UTF-8 strings under Windows

Same as std::ofstream but accepts UTF-8 strings under Windows

Function Documentation

BOOSTER_API std::string booster::nowide::convert ( wchar_t const *  s)

Convert between UTF-16 and UTF-8 string, implemented only on Windows platform

Referenced by convert(), fopen(), freopen(), remove(), and rename().

BOOSTER_API std::wstring booster::nowide::convert ( char const *  s)

Convert between UTF-8 and UTF-16 string, implemented only on Windows platform

std::string booster::nowide::convert ( std::wstring const &  s)
inline

Convert between UTF-16 and UTF-8 string, implemented only on Windows platform

References convert().

std::wstring booster::nowide::convert ( std::string const &  s)
inline

Convert between UTF-8 and UTF-16 string, implemented only on Windows platform

References convert().

FILE* booster::nowide::fopen ( char const *  file_name,
char const *  mode 
)
inline

Same as C fopen, but accepts UTF-8 string as file name under Windows

References convert().

FILE* booster::nowide::freopen ( char const *  file_name,
char const *  mode,
FILE *  stream 
)
inline

Same as C freopen, but accepts UTF-8 string as file name under Windows

References convert().

int booster::nowide::remove ( char const *  name)
inline

Same as C remove, but accepts UTF-8 string as file name under Windows

References convert().

int booster::nowide::rename ( char const *  old_name,
char const *  new_name 
)
inline

Same as C rename, but accepts UTF-8 strings as file names under Windows

References convert().