Skip to content

Commit

Permalink
Update comment in jsb_global.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
dumganhar committed Jul 26, 2024
1 parent 589959d commit aa1742a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion native/cocos/bindings/manual/jsb_global.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1335,9 +1335,10 @@ static bool js_TextDecoder_constructor(se::State &s) // NOLINT(readability-ident
if (argc > 0) {
if (args[0].isString()) {
// https://developer.mozilla.org/en-US/docs/Web/API/Encoding_API/Encodings
// NOTE: We only support utf-8 encoding now.
// NOTE: We only support utf-8 and utf-16 encoding now.
auto label = args[0].toString();

// Convert to lowercase to support 'UTF-8', 'UTF-16'
std::transform(label.begin(), label.end(), label.begin(), [](char c){
return std::tolower(c);
});
Expand Down

0 comments on commit aa1742a

Please sign in to comment.