You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Erik Huelsmann <e....@gmx.net> on 2004/04/18 21:50:04 UTC

[PATCH] Subversion UTF-8 internals & gettext


Re: Subversion UTF-8 internals & gettext

Posted by Erik Huelsmann <e....@gmx.net>.
> > Is there no way to (portably) tell gettext to leave well enough alone 
> > and not do _any_ recoding at all?
 
[ snip ]

> In the Solaris 9 manpage
> (http://docs.sun.com/db/doc/817-0662/6mger1dl8?a=view) I read that there
> is
> a function called bind_textdomain_codeset() at least on version 9; whether
> it is available on earlier versions I can't tell. I guess Justin was
> referring to older versions of Solaris though. 

Some Googling helped out there eventually. It's been added to Solaris 8 in a
patch. (See
http://mail.gnu.org/archive/html/bug-gnu-utils/2002-11/msg00128.html)

bye,

Erik.

-- 
"Sie haben neue Mails!" - Die GMX Toolbar informiert Sie beim Surfen!
Jetzt aktivieren unter http://www.gmx.net/info


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Subversion UTF-8 internals & gettext

Posted by Erik Huelsmann <e....@gmx.net>.
> Is there no way to (portably) tell gettext to leave well enough alone 
> and not do _any_ recoding at all?

Not that I can find. The only way to prevent recoding would be to generate
UTF-8 catalogues and set the output characterset to UTF-8 using the
bind_textdomain_codeset() call (which Justin says is unavailable on
Solaris).

In the Solaris 9 manpage
(http://docs.sun.com/db/doc/817-0662/6mger1dl8?a=view) I read that there is
a function called bind_textdomain_codeset() at least on version 9; whether
it is available on earlier versions I can't tell. I guess Justin was
referring to older versions of Solaris though. 

bye,

Erik.


-- 
"Sie haben neue Mails!" - Die GMX Toolbar informiert Sie beim Surfen!
Jetzt aktivieren unter http://www.gmx.net/info


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Subversion UTF-8 internals & gettext

Posted by Branko Čibej <br...@xbc.nu>.
Erik Huelsmann wrote:

>>--On Sunday, April 18, 2004 11:50 PM +0200 Erik Huelsmann 
>><e....@gmx.net> wrote:
>>
>>    
>>
>>>From the following paragraph in the gettext manual I conclude that we
>>>      
>>>
>>should
>>    
>>
>>>be applying the patch below to make sure our internals stay in UTF-8.
>>>      
>>>
>>I'm sort of -0 as this is one of the GNU-isms that isn't supported by most
>>non-GNU gettext.  Is there a real need (i.e. something is broken) that 
>>mandates us having this?  -- justin
>>    
>>
>
>Not really, except that output from _() and dgettext() is passed to
>svn_error_create(f). We would have to do one of two things to get consistent
>errors again:
>1) recode the output from (d)gettext ourselves to UTF-8
>or
>2) recode error text from the server to the local locale on reception.
>
>I think that option number (2) gets messy and it will become unpredictable
>which encoding is passsed along to which function.
>
>So I'd like to either bind the codeset to tell gettext to do the recoding,
>or to do it ourselves. The last option introduces one extra recoding step
>(<mo-input-encoding> -> local encoding -> utf8 -> local encoding) instead of
>(<mo-input-encoding> -> utf8 -> local encoding). Which could even be reduced
>one more step by generating utf8 .mo files.
>  
>
Is there no way to (portably) tell gettext to leave well enough alone 
and not do _any_ recoding at all?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Subversion UTF-8 internals & gettext

Posted by Erik Huelsmann <e....@gmx.net>.
> --On Sunday, April 18, 2004 11:50 PM +0200 Erik Huelsmann 
> <e....@gmx.net> wrote:
> 
> > From the following paragraph in the gettext manual I conclude that we
> should
> > be applying the patch below to make sure our internals stay in UTF-8.
> 
> I'm sort of -0 as this is one of the GNU-isms that isn't supported by most
> non-GNU gettext.  Is there a real need (i.e. something is broken) that 
> mandates us having this?  -- justin

Not really, except that output from _() and dgettext() is passed to
svn_error_create(f). We would have to do one of two things to get consistent
errors again:
1) recode the output from (d)gettext ourselves to UTF-8
or
2) recode error text from the server to the local locale on reception.

I think that option number (2) gets messy and it will become unpredictable
which encoding is passsed along to which function.

So I'd like to either bind the codeset to tell gettext to do the recoding,
or to do it ourselves. The last option introduces one extra recoding step
(<mo-input-encoding> -> local encoding -> utf8 -> local encoding) instead of
(<mo-input-encoding> -> utf8 -> local encoding). Which could even be reduced
one more step by generating utf8 .mo files.

bye,

Erik.

-- 
"Sie haben neue Mails!" - Die GMX Toolbar informiert Sie beim Surfen!
Jetzt aktivieren unter http://www.gmx.net/info


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Subversion UTF-8 internals & gettext

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
--On Sunday, April 18, 2004 11:50 PM +0200 Erik Huelsmann 
<e....@gmx.net> wrote:

> From the following paragraph in the gettext manual I conclude that we should
> be applying the patch below to make sure our internals stay in UTF-8.

I'm sort of -0 as this is one of the GNU-isms that isn't supported by most 
non-GNU gettext.  Is there a real need (i.e. something is broken) that 
mandates us having this?  -- justin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Subversion UTF-8 internals & gettext

Posted by "Peter N. Lundblad" <pe...@famlundblad.se>.
On Mon, 28 Jun 2004 kfogel@collab.net wrote:

> I'm not expert enough in gettext() or i18n in general to judge the
> patch in http://subversion.tigris.org/issues/show_bug.cgi?id=1874.
>
> Could someone who *is* expert enough please take a look at it, and
> either apply the patch, or close the issue as WONTFIX, or take some
> other sort of decisive, cowboy-like action? :-)
>
Thanks for pointing me to this issue. A change to this effect is included
in my patch regarding msgfmt compile warnings. Will commit tomorrow
probably and close this issue then.

//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Subversion UTF-8 internals & gettext

Posted by kf...@collab.net.
I'm not expert enough in gettext() or i18n in general to judge the
patch in http://subversion.tigris.org/issues/show_bug.cgi?id=1874.

Could someone who *is* expert enough please take a look at it, and
either apply the patch, or close the issue as WONTFIX, or take some
other sort of decisive, cowboy-like action? :-)

(It appears to be one of those patches where the thread died out
without a resolution.)

Thanks as always to Michael Thelen for his No Sparrow Shall Fall
policy.

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org