mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-30 06:09:48 +01:00
Enable mojibake
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user