What is special about the Telugu language

Telugu bug on iOS and macOS: An attempt to explain

Stephan Wiesend

The crashes of iOS and macOS apps are apparently triggered by the display of more complex Unicode characters

EnlargeTelugu is not the only language affected.

The Telugu language is little known in Europe, but it is spoken by around 74 million people in India. How can it be that a character in this language causes trouble on iOS? The fact that the error has not been known for a long time is probably due to the fact that the problem character "Gna" is a compound symbol made up of the Unicode characters U + 0C1C U + 0C4D U + 0C1E U + 200C U + 0C3E exists. To create this character “Gna” you have to enter the characters j, z aa on an Indian keyboard to generate it.

Strange coincidence: According to the "Times of India" it occurs when the word "Gnamam" is formed, which means wisdom or knowledge, as well as with "Agnathavasai", which means that someone is cut off from the world ... A current one iOS 11 or macOS 11.3 you only have to receive this text as a message or copy it into a Mac program and the program and Spotlight crash immediately.

Problems with Unicode?

Apple has always taken pride in the fact that macOS and iOS support almost all languages ​​and fonts. Obviously, there is a fundamental problem in this language support. Characters like Gna are not available as a retrievable file, but are defined as Unicode characters and are only rendered by the system or prepared for display if necessary. Obviously one should not underestimate the complexity of this calculation. So far it is not entirely clear which process actually crashes in Apple's app, whether it happens when the characters are generated or when they are displayed. So not all Apple programs are affected, Textedit can display the character without any problems, Safari as an element of an HTML page as well - unless you copy it into Safari, Safari crashes.

Unfortunately, it is not just a few special characters that are affected. Certain strings in Bengal and other Indian languages ​​can also cause app crashes, as Manish Goregaokar proves. Apparently, Apple Text Renderer, which represents font, is making a fundamental mistake here. Philippe Verdy has one guess: According to the developer's guess, Apple's font engine creates a cache file while the font is being displayed. This leads to problems with complex character sequences if, for example, one character in the sequence requires the representation of the other characters, e.g. a so-called glyph substitution. The theory: If there is such a character cache and a character coming a little later in the sequence requires a change to the half-rendered cache content, this leads to the program crash.

We hope that Apple not only patches the display of individual characters with the promised update, but also thoroughly improves it. Since Apple has repeatedly referred to India as an important future market, such mistakes cannot really be allowed.