This site uses cookies to deliver our services and to show you relevant ads and job listings. By using our site, you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service. Your use of Stack Overflow’s Products and Services, including the Stack Overflow Network, is subject to these policies and terms.

You've got some terminology issues. Your question is equally valid to any system that uses Unicode, not just those that store strings using its UTF-8 encoding. All the characters you are using are Unicode. By ASCII, you seem to mean C0 Controls and Basic Latin. UTF-8 is not considered extended ASCII. Also, your for x in a iterates over Unicode codepoints, not UTF-8 code units. (== does compare the sequences of UTF-8 code units.) –
Tom BlodgetOct 22 '17 at 14:44