[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Transliteration for use in UTF-8 locales
Markus Kuhn <Markus.Kuhn@xxxxxxxxxxxx>:
> > Is it really a good idea to do transliteration in the locale?
>
> Yes, I definitely think so. If not, there would have to be an extra
> transliteration API that in practice most developers would not bother to
> use.
How does that follow?
Since the wchar_t representation is locale-dependent, it doesn't seem
unreasonable to assume that transliteration will have happened before
wcrtomb gets invoked.
Stuff like gettext messages is converted by iconv anyway.
Perhaps you could give an example of how the transliteration in the
locale can have a good effect.
> If you find any passage that says something to the effect of for all
> wide characters W: mb->wc(wc->mb(W)) = W or an error has to be signaled,
> then please quote chapter and verse.
I haven't found one. However, I have written code that will break if
the converse is not constrained to be true, i.e. wc->mb(mb->wc(X) = X.
Is this guaranteed anywhere?
I have always assumed that the multibyte representation is appropriate
for use as an internal representation, not just as a presentation for
display to human readers.
Edmund
-
Linux-UTF8: i18n of Linux on all levels
Archive: http://mail.nl.linux.org/lists/