Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fmt
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
fmt
Commits
7eec036d
Commit
7eec036d
authored
Dec 21, 2019
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve UTF-8 support
parent
e6b37b4a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
include/fmt/format-inl.h
include/fmt/format-inl.h
+9
-0
No files found.
include/fmt/format-inl.h
View file @
7eec036d
...
...
@@ -1336,11 +1336,20 @@ FMT_FUNC void report_system_error(int error_code,
report_error
(
format_system_error
,
error_code
,
message
);
}
#ifndef FMT_UNICODE
# define FMT_UNICODE 0
#endif
FMT_FUNC
void
vprint
(
std
::
FILE
*
f
,
string_view
format_str
,
format_args
args
)
{
memory_buffer
buffer
;
internal
::
vformat_to
(
buffer
,
format_str
,
basic_format_args
<
buffer_context
<
char
>>
(
args
));
#if FMT_UNICODE
internal
::
utf8_to_utf16
u16
(
string_view
(
buffer
.
data
(),
buffer
.
size
()));
std
::
fputws
(
u16
.
c_str
(),
f
);
#else
internal
::
fwrite_fully
(
buffer
.
data
(),
1
,
buffer
.
size
(),
f
);
#endif
}
FMT_FUNC
void
vprint
(
string_view
format_str
,
format_args
args
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment