On Tue, Apr 25, 2006 at 02:56:59PM +0200, Reimar D�ffinger wrote:
Hi, On Tue, Apr 25, 2006 at 09:54:02AM +0300, Ivan Kalvachev wrote:
2006/4/23, Reimar Döffinger <Reimar.Doeffinger@stud.uni-karlsruhe.de>:
Also, the utf8_get_char function is a bit overkill for this, since it will always encouter valid UTF-8 in this case, but I made it more flexible in the hope in will be used in other place as well in the future.
I think this is going to be the second utf-8 parser in that file, as subs are (usually) already utf-8. Take a look of vo_update_text_sub::382
I know, but that code could in case of invalid encoding skip the terminating NULL and cause a segfault. Thus it is unsuitable for most cases, and this is actually one of the utf8-parsers I'd like to replace.
What about storing strings internally in UCS-2? Parse once when reading so there will be no need to recode UTF-8 -> UCS-2 before displaying. Regards -- Adam Tlałka mailto:atlka@pg.gda.pl ^v^ ^v^ ^v^ PGP public key: finger atlka@sunrise.pg.gda.pl