Swift 5 will use UTF-8 as the preferred encoding of strings
The Swift official blog announces Swift 5’s ability to switch from preferred UTF-16 to UTF-8 while retaining effective interoperability with Objective-C. Because the String type abstracts these underlying problems, the developer does not need to make changes to the source code.
Switching to UTF-8 implements one of the long-term goals of String — enabling high-performance processing, which is the biggest request for developers who care about performance. More importantly, this feature also lays the foundation for a higher performance API in the future. The preferred encoding of the string will be part of the performance of the Swift ABI, so this time it is imperative to implement this functionality for the stability of the ABI in the Swift 5 release.