[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: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2004-12-05 21:56:42 CET

On Sun, 5 Dec 2004, Philip Martin wrote:

> Norbert Unterberg <nepo@gmx.net> writes:
>
> > const char *replies = _("RrTtPp"); /* allow l10n */
> >
> > ...
> >
> > svn_stringbuf_appendcstr
> >
> > (buf, _("(R)eject, accept (t)emporarily or accept (p)ermanently? "));
> >
> > ...
> >
> > SVN_ERR (prompt (&choice, buf->data, FALSE, ctx, pool));
> >
> > if (choice && (choice[0] == replies[2] || choice[0] == replies[3]))
> >
> > { ... }
>
> I think it assumes that the replies are represented by single bytes.
> While that may be acceptable for western languages does it apply to
> things like Chinese? Hmm, our prompt code doesn't appear to handle
> multiple byte replies either :(
>
>
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);

This is needed (in some form) for *real* character (not byte)
classification functions, which we also need. I've been thinking about
tackling this, but ceratinly not before locking is done. So, if I will do
it, it will probably be in 1.3. Anyone, feel free to do it before that,
ofcourse.

Regards,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Dec 5 21:57:30 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.