Note that the "take the first codepoint" approach doesn't work for all languages. Take Hindi for example. This is a name:
प्रेरणा
'preraṇa'
The convention for initials in Hindi is such that this would be the "initial":
प्रे॰ (< प + ् + र + े + ॰)
'pre'
which is the first four codepoints combined (because they are in some sense considered a single character) plus another codepoint!
If for some reason you needed to respect locale-specific initialism conventions for a lot of different locales, it might be worth introducing an abstraction for determining the initials of a name.
Comments
Note that the "take the first codepoint" approach doesn't work for all languages. Take Hindi for example. This is a name:
The convention for initials in Hindi is such that this would be the "initial": which is the first four codepoints combined (because they are in some sense considered a single character) plus another codepoint!If for some reason you needed to respect locale-specific initialism conventions for a lot of different locales, it might be worth introducing an abstraction for determining the initials of a name.
http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-b...
:)
Thanks for letting me know! I will stuff different languages over the coming months to better manage such things :) didn’t know that