Accept UTF-8 for String(const char*)

Arguments for:

  • UTF-8 is much more commonly used than ASCII (at least I hope so)
  • Modern C++ has u8"", and even in the old days you could easily put UTF-8 in string literals
  • consistency — juce::String(const std::string &) already accepts UTF-8

And we can have an assert that a string is valid UTF-8, I don’t think it is likely that other code pages result in valid UTF-8.

1 Like