> Code spontaneously fails depending on the locale?
It doesn't spontaneously fail. The languages functions are case-insensitive and they documented this. [1] [2] When you change the locale to Turkish the letters change. Thus, the class name changes and no longer works as expected.
So it is documented because it may not as expected, but it is not spontaneous.