The fact that the string is UTF-8 encoded doesn't really matter. The problem is that you can't assign arrays using the = operator. You can use std::strcpy to copy the string from one array to another but I recommend using std::string because that makes a lot of string operations much much easier.