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

Re: Remaining l10n issues

From: Peter N. Lundblad <lundblad_at_softhome.net>
Date: 2004-05-06 20:17:49 CEST

Hi,

On Thu, 6 May 2004, Michael Sweet wrote:

> Peter N. Lundblad wrote:
> >
> > On Thu, 6 May 2004, [UTF-8] Branko Ä^Libej wrote:
> >
> >
> > I think we have a little encoding problem, however. If we do
> > svn_cmdline_printf(pool, fmt, ...)
> > expecting all string arguments (including fmt) to be UTF-8, then we can
> > convert the string. The problem, however, is that numbers will be output
> > in the native encoding by the APR routines. They are just ASCII, but may
> > this be a problem anyway? Do we have a similar problem in
> > svn_stream_printf? I think it expects it arguments as UTF-8?
> >
> > What do you think?
>
> Delay the UTF-8 to locale transcoding until right before the
> text is written to the console. Similarly, convert the input
[...]

Yes, that's what I'm going to do. Problem is this:
- svn_cmdline_printf() takes UTF-8 *strings* and other argument types
- apr_psprintf will not touch the encoding of the strings, but it will
ocnvert %d etc. to the locale's encoding (no, it won't, it converts it
using numbers, . etc. from the C execution character set...)
- When we are going to convert from UTF-8, we may have a mixed encoing
string:-(

Since the digits and the other characters that apr_psprintf will produce
are in the ASCII (7-bit) range, they are the same for UTF-8 in ASCII-based
encodings. So this shouldn't be a problem in most cases. But what happens
on, i.e. EBCDIC systems? Anyone who knows?

This is getting really messy, but since we have to replace stdio printf
and friends to support other things, I think we will have to solve this
problem.

Regards,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat May 8 00:22:52 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.