# [PATCH/RFH] Mark user-manual as UTF-8

5 messages from 2007-07-24 to 2007-07-24. Participants: Junio C Hamano, Jeff King, Wincent Colaiuta, Thierry Parmentelat, J. Bruce Fields.
Thread: https://gitlist.dev/t/9193

## Junio C Hamano, 2007-07-24 07:46

Subject: [PATCH/RFH] Mark user-manual as UTF-8
Message-ID: <7vwswqgs6c.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vwswqgs6c.fsf%40assigned-by-dhcp.cox.net

```
There have been several complaints against k.org's user-manual
page.  The document is generated in ISO-8859-1 by the xsltproc
toolchain (I suspect this is because released docbook.xsl we use
has xsl:output element that says the output is ISO-8859-1) but
server delivers it with "charset=UTF-8", and all h*ll breaks
loose.

This attempts to force UTF-8 on the generating end.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---

 * I have to warn that I do not really think I know what I am
   doing, but this seems to "work for me".

 Documentation/Makefile    |    2 +-
 Documentation/docbook.xsl |    5 +++++
 2 files changed, 6 insertions(+), 1 deletions(-)
 create mode 100644 Documentation/docbook.xsl

diff --git a/Documentation/Makefile b/Documentation/Makefile
index b062757..3bc5357 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -131,7 +131,7 @@ clean:
 user-manual.xml: user-manual.txt user-manual.conf
 	$(ASCIIDOC) -b docbook -d book $<
 
-XSLT = http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl
+XSLT = docbook.xsl
 XSLTOPTS = --xinclude --stringparam html.stylesheet docbook-xsl.css
 
 user-manual.html: user-manual.xml
diff --git a/Documentation/docbook.xsl b/Documentation/docbook.xsl
new file mode 100644
index 0000000..9a6912c
--- /dev/null
+++ b/Documentation/docbook.xsl
@@ -0,0 +1,5 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+		version='1.0'>
+ <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"/>
+ <xsl:output method="html" encoding="UTF-8" indent="no" />
+</xsl:stylesheet>

```

## Jeff King, 2007-07-24 08:53

Subject: Re: [PATCH/RFH] Mark user-manual as UTF-8
Message-ID: <20070724085340.GA10729@coredump.intra.peff.net>
URL: https://gitlist.dev/e/20070724085340.GA10729%40coredump.intra.peff.net
In-Reply-To: <7vwswqgs6c.fsf@assigned-by-dhcp.cox.net>

```
On Tue, Jul 24, 2007 at 12:46:35AM -0700, Junio C Hamano wrote:

> This attempts to force UTF-8 on the generating end.
> [...]
>  * I have to warn that I do not really think I know what I am
>    doing, but this seems to "work for me".

I'm by no means a docbook expert, but I think what you've done is sane.
Supposedly there is an xsl:param "chunker.output.encoding" which would
let you do the same thing from the xsltproc command line, but I can't
seem to get it to work (and I don't know enough about xsl to even begin
figuring out why).

-Peff

```

## Wincent Colaiuta, 2007-07-24 10:36

Subject: Re: [PATCH/RFH] Mark user-manual as UTF-8
Message-ID: <4753DAE3-2F1F-49C0-906A-09CBAF240C87@wincent.com>
URL: https://gitlist.dev/e/4753DAE3-2F1F-49C0-906A-09CBAF240C87%40wincent.com
In-Reply-To: <7vwswqgs6c.fsf@assigned-by-dhcp.cox.net>

```
El 24/7/2007, a las 9:46, Junio C Hamano escribió:

> There have been several complaints against k.org's user-manual
> page.  The document is generated in ISO-8859-1 by the xsltproc
> toolchain (I suspect this is because released docbook.xsl we use
> has xsl:output element that says the output is ISO-8859-1) but
> server delivers it with "charset=UTF-8", and all h*ll breaks
> loose.
>
> This attempts to force UTF-8 on the generating end.

Thanks for doing this, Junio. I was one of the people who reported  
this (although never saw my mail get through to the list).

Funnily, enough, about an hour after you posted your patch another  
email ("git documentation - user manual html version has wierd [sic]  
characters all over the place") was posted to the list...

Cheers,
Wincent

```

## Thierry Parmentelat, 2007-07-24 10:45

Subject: Re: [PATCH/RFH] Mark user-manual as UTF-8
Message-ID: <46A5D831.6090608@sophia.inria.fr>
URL: https://gitlist.dev/e/46A5D831.6090608%40sophia.inria.fr
In-Reply-To: <4753DAE3-2F1F-49C0-906A-09CBAF240C87@wincent.com>

```
Hi there - I'm the wierd guy :-)

I've just reloaded the page and the weird stuff has gone.


Wincent Colaiuta wrote:
> El 24/7/2007, a las 9:46, Junio C Hamano escribió:
>
>> There have been several complaints against k.org's user-manual
>> page.  The document is generated in ISO-8859-1 by the xsltproc
>> toolchain (I suspect this is because released docbook.xsl we use
>> has xsl:output element that says the output is ISO-8859-1) but
>> server delivers it with "charset=UTF-8", and all h*ll breaks
>> loose.
>>
>> This attempts to force UTF-8 on the generating end.
>
> Thanks for doing this, Junio. I was one of the people who reported 
> this (although never saw my mail get through to the list).
>
> Funnily, enough, about an hour after you posted your patch another 
> email ("git documentation - user manual html version has wierd [sic] 
> characters all over the place") was posted to the list...
>
> Cheers,
> Wincent

```

## J. Bruce Fields, 2007-07-24 14:50

Subject: Re: [PATCH/RFH] Mark user-manual as UTF-8
Message-ID: <20070724145031.GB24302@fieldses.org>
URL: https://gitlist.dev/e/20070724145031.GB24302%40fieldses.org
In-Reply-To: <7vwswqgs6c.fsf@assigned-by-dhcp.cox.net>

```
On Tue, Jul 24, 2007 at 12:46:35AM -0700, Junio C Hamano wrote:
> There have been several complaints against k.org's user-manual
> page.  The document is generated in ISO-8859-1 by the xsltproc
> toolchain (I suspect this is because released docbook.xsl we use
> has xsl:output element that says the output is ISO-8859-1) but
> server delivers it with "charset=UTF-8", and all h*ll breaks
> loose.
> 
> This attempts to force UTF-8 on the generating end.

Thanks for looking into this!  I've seen what I assume is the same
problem sporadically before and been unsuccesful at finding the
source....

--b.

```
