DescriptionEnsure syncer::internal::GetComputerName returns a UTF-8 string.
Prior to this change, on Windows, GetComputerName resulted in a call to
GetComputerNameA, which returns an ANSI string (not ASCII, not UTF-8).
Call GetComputerNameW instead and convert the returned wide string to
UTF-8.
Tested by adding U+00AB to the computer name. Saw in about:sync the
name contained a U+FFFD instead (symbol for unrepresentable character).
Performed sync dashboard clear, applied patch, saw that the name
correctly contained U+00AB.
This CL does not address corrupted device info that's already in the
field. Depending on impact that may be addressed in a future CL.
BUG=406470
Committed: https://crrev.com/58cfacd2313c2a67aa52e02f1eccc352df427502
Cr-Commit-Position: refs/heads/master@{#292466}
Patch Set 1 #Patch Set 2 : Get things compiling. #Patch Set 3 : Use the returned size instead of wcslen(). #
Total comments: 2
Messages
Total messages: 9 (0 generated)
|