Skip to content

Commit

Permalink
test: update doc in code
Browse files Browse the repository at this point in the history
  • Loading branch information
tony-go committed Aug 31, 2022
1 parent 9c00c2c commit d508d03
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/api/encoding.cc
Expand Up @@ -15,7 +15,11 @@ enum encoding ParseEncoding(const char* encoding,
switch (encoding[0]) {
case 'u':
case 'U':
// utf8, utf16le
// Note: the two first conditions are needed for performance reasons
// as "utf8"/"utf-8" is a common case.
// (same for other cases below)

// utf, utf16le
if (encoding[1] == 't' && encoding[2] == 'f') {
// Skip `-`
const size_t skip = encoding[3] == '-' ? 4 : 3;
Expand Down

0 comments on commit d508d03

Please sign in to comment.