# Accept UTF-8 for String(const char\*)

**URL:** <https://forum.juce.com/t/accept-utf-8-for-string-const-char/32481>\
**Category:** General JUCE discussion\
**Created:** [March 25, 2019, 1:17am UTC](https://forum.juce.com/t/accept-utf-8-for-string-const-char/32481 "2019-03-25T01:17:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![roeland-2](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/roeland-2/32/738_2.png) [@roeland-2](https://forum.juce.com/u/roeland-2)\
**Post date:** [March 25, 2019, 1:17am UTC](https://forum.juce.com/t/accept-utf-8-for-string-const-char/32481/1 "2019-03-25T01:17:37Z")

</div>

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.
