Enable mojibake

This commit is contained in:
Victor Zverovich
2019-12-24 08:20:54 -08:00
parent 9f6434dcde
commit 5390e29d42
2 changed files with 13 additions and 8 deletions

View File

@@ -1507,15 +1507,14 @@ inline std::basic_string<Char> format(const S& format_str, Args&&... args) {
{internal::make_args_checked<Args...>(format_str, args...)});
}
FMT_API void vprint(string_view format_str, format_args args);
FMT_API void vprint(std::FILE* f, string_view format_str, format_args args);
FMT_API void vprint_mojibake(std::FILE* f, string_view format_str,
format_args args);
FMT_API void vprint(string_view, format_args);
FMT_API void vprint(std::FILE*, string_view, format_args);
FMT_API void vprint_mojibake(std::FILE*, string_view, format_args);
/**
\rst
Prints formatted data to the file *f*. For wide format strings,
*f* should be in wide-oriented mode set via ``fwide(f, 1)``.
Prints formatted data to the file *f*. For wide format strings *f* should be
in wide-oriented mode set via ``fwide(f, 1)``.
**Example**::
@@ -1525,8 +1524,13 @@ FMT_API void vprint_mojibake(std::FILE* f, string_view format_str,
template <typename S, typename... Args,
FMT_ENABLE_IF(internal::is_string<S>::value)>
inline void print(std::FILE* f, const S& format_str, Args&&... args) {
#if !defined(_WIN32) || FMT_UNICODE
vprint(f, to_string_view(format_str),
internal::make_args_checked<Args...>(format_str, args...));
#else
vprint_mojibake(f, to_string_view(format_str),
internal::make_args_checked<Args...>(format_str, args...));
#endif
}
/**