[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-wget] [Bug-Wget][BUG] Progress bar does not support multibyte c
From: |
Giuseppe Scrivano |
Subject: |
Re: [Bug-wget] [Bug-Wget][BUG] Progress bar does not support multibyte characters |
Date: |
Thu, 04 Sep 2014 19:04:55 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Darshit Shah <address@hidden> writes:
> Yes, I guess I'm looking for UTF-8 strings, because other character
> encodings wouldn't create this problem, (I think?)
> I'll look at the Wiki page again and see of GNULib has anything, Right
> now, I'm trying to implement a solution based on wide characters
> through wchar.h but I don't like the code I've written. I's prefer
> something more elegant and efficient.
have you had a look at the mbiter module of gnulib? Its documentation
says that you can turn:
char *iter;
for (iter = buf; iter < buf + buflen; iter++)
{
do_something (*iter);
}
into:
mbi_iterator_t iter;
for (mbi_init (iter, buf, buflen); mbi_avail (iter); mbi_advance
(iter))
{
do_something (mbi_cur_ptr (iter), mb_len (mbi_cur (iter)));
}
and seems quite straightforward to me.
Regards,
Giuseppe
- Re: [Bug-wget] [Bug-Wget][BUG] Progress bar does not support multibyte characters,
Giuseppe Scrivano <=