[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Localization of user replies

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2004-12-07 01:31:25 CET

Branko Œibej <brane@xbc.nu> writes:

> Peter N. Lundblad wrote:
>>It most probably doesn't. We need code to get UTF8 *characters* from a
>>string. Something like:
>>svn_error_t *
>>svn_utf_next_char(unsigned &code, const char **follow, const char *pos);
> You're going to break your head ate verey turn if you try to handle
> multibyte sequences like that. The only reasonable solution here is to
> use wide chars instead of UTF-8 in such places. Which, after a while,
> meanse everywhere (and convert to UTF-8 when doing network I/O)

In this particular case could we not simply use null-terminated
strings and strcmp instead of single bytes?

    const char *reject[] = {"R", "r"};
    const char *temp[] = {"T", "t"};
    const char *perm[] = {"P", "p"};
    const char *choice;
    SVN_ERR (prompt (&choice, ...));
    if (!strcmp (choice, reject[0]) || !strcmp (choice, reject[1]))
    else if (!strcmp (choice, temp[0]) || !strcmp (choice, temp[1]))
    else if (!strcmp (choice, perm[0]) || !strcmp (choice, perm[1]))

Philip Martin
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Dec 7 01:32:33 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.