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
9830c528
Commit
9830c528
authored
May 01, 2014
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix UTF8ToUTF16.
parent
73d98d5d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
format.cc
format.cc
+2
-2
No files found.
format.cc
View file @
9830c528
...
@@ -176,12 +176,12 @@ fmt::internal::UTF8ToUTF16::UTF8ToUTF16(fmt::StringRef s) {
...
@@ -176,12 +176,12 @@ fmt::internal::UTF8ToUTF16::UTF8ToUTF16(fmt::StringRef s) {
CP_UTF8
,
MB_ERR_INVALID_CHARS
,
s
.
c_str
(),
-
1
,
0
,
0
);
CP_UTF8
,
MB_ERR_INVALID_CHARS
,
s
.
c_str
(),
-
1
,
0
,
0
);
static
const
char
ERROR
[]
=
"cannot convert string from UTF-8 to UTF-16"
;
static
const
char
ERROR
[]
=
"cannot convert string from UTF-8 to UTF-16"
;
if
(
length
==
0
)
if
(
length
==
0
)
Throw
System
Error
(
GetLastError
(),
ERROR
);
Throw
Win
Error
(
GetLastError
(),
ERROR
);
buffer_
.
resize
(
length
);
buffer_
.
resize
(
length
);
length
=
MultiByteToWideChar
(
length
=
MultiByteToWideChar
(
CP_UTF8
,
MB_ERR_INVALID_CHARS
,
s
.
c_str
(),
-
1
,
&
buffer_
[
0
],
length
);
CP_UTF8
,
MB_ERR_INVALID_CHARS
,
s
.
c_str
(),
-
1
,
&
buffer_
[
0
],
length
);
if
(
length
==
0
)
if
(
length
==
0
)
Throw
System
Error
(
GetLastError
(),
ERROR
);
Throw
Win
Error
(
GetLastError
(),
ERROR
);
}
}
fmt
::
internal
::
UTF16ToUTF8
::
UTF16ToUTF8
(
fmt
::
WStringRef
s
)
{
fmt
::
internal
::
UTF16ToUTF8
::
UTF16ToUTF8
(
fmt
::
WStringRef
s
)
{
...
...
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