(This basically explains why UTF-8 encoding is needed for ASCII. I will not explain part of the URL for this problem, as Tim Bodeit has already done well.)
Main Explanation:
ASCII encoding only contains characters with a character without a character, while UTF-8 contains characters for most languages.
More details:
ASCII only has the characters shown in the image below, although it only fits in seven bits (or eight, depending on how you look at it).

However, both Unicode and UTF-8 can contain any characters from almost all major languages. UTF-8 is preferred for Unicode, because when your application uses characters that are in ASCII (in English), it will be only one byte. When your application uses Hebrew, the string will be several bytes longer. If you use Unicode, your string will ALWAYS have more than one byte, whether in English or Hebrew.
Decision? Just change everything that ASCII says to UTF8.
You (and every other programmer) should absolutely read this article .
This is Joel Spolsky (co-founder of Stack Exchange), and it is very useful for any program that uses strings that are most programs. You will especially benefit if you work with Hebrew and English.
By the way, you should remove the tags for iOS, iPhone, iPad and replace it with Objective-C, since your code fragment can also be applied to programming for Mac.
source share