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

Re: Stripping 'charset=' from po files [the sequal]

From: Ben Reser <ben_at_reser.org>
Date: 2004-05-13 20:35:43 CEST

On Thu, May 13, 2004 at 08:13:52PM +0200, Erik Huelsmann wrote:
> In order to prevent charset conversion by 'smart' gettext implementations
> our build system has to strip out the the 'charset=UTF-8' string in the
> administrative section of po files. The Makefile based system currently
> does this by ripping out the entire 'Content-Type' line using 'sed'.
> The Windows (python based) build system does not provide sed. To work
> around that I wrote the general python based po parser included below. A
> separate script does the real stripping. This also provides the (cleaner)
> solution to only examen the admin section.


> 3) Do you have any comments to either script? (the strip charset script has
> to be extended to include plural support before this code can be committed)

Uhh isn't that overly complicated? Can't you do something that is
roughly similar to the sed script in the Makefile? I'd be really
surprised if python couldn't do that. But if it can't you could do it
with Perl. The Windows build already requires it.

For example:
perl -pe 's#^"Content-Type: text/plain; charset=UTF-8\\n"\n$##' es.po >

Ben Reser <ben@reser.org>
"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu May 13 20:35:58 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.