This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
[docbook-apps] dsssl/openjade: Trouble with half-width kanji characters
- From: "Karl Critz" <Karl dot Critz at mathworks dot com>
- To: <docbook-apps at lists dot oasis-open dot org>
- Date: Fri, 14 Jan 2005 15:49:52 -0500
- Subject: [docbook-apps] dsssl/openjade: Trouble with half-width kanji characters
I am having trouble processing an XML document which contains a mix of
standard-width and half-width kanji characters.
When I process the document to RTF with OpenJade and the DocBook DSSSL
print stylesheets, the half-width kanji characters appear as empty boxes
because the font chosen for them is Arial. If I select these characters
in Word and manually change the font to a kanji-aware font (such as
mincho or ms gothic) they display correctly.
When I process this document into HTML with Saxon and the DocBook XSLT
stylesheets, everything works as expected. Similarly, going to PDF with
FOP and the DocBook FO stylesheets works correctly.
My theory is that the half-width characters are single-byte instead of
double-byte and the stylesheets assume that they are western characters
instead of kanji. As such, they apply a western font.
This is 100% reproducible. I'll try to include the XML file below, but
I'm not sure that the file's encoding will be preserved at every step in
the mail toolchain. The last 4 characters in the <title> are
half-width.
Is there anything I can do to fix this situation?
thanks
-karl critz
-----------------------------------------------
<?xml version="1.0" encoding="shift_jis"?>
<!DOCTYPE book PUBLIC '-//OASIS//DTD DocBook V4.2//EN'>
<book lang="ja">
<title>レポート・ジェネ&
#12524;ータのチェック</title>
<bookinfo>
<title>レポート・ジェネ&
#12524;ータのチェック</title>
<subtitle>(2)スナップショッ
2488;のチェック</subtitle>
<author>
<firstname>サイバネットシʎ
05;テム</firstname>
</author>
<pubdate>10-Jan-2005 21:45:15</pubdate>
<abstract>
<para>このファイルはス&#
12490;ップショットの表&#
31034;をチェックします&#
12290;</para>
</abstract>
<legalnotice>
<para>リーガル・ノーテ&#
65384;ス</para>
</legalnotice>
</bookinfo>
<chapter>
<title>セクション・タイ&
#65412;ル</title>
<para>これはパラグラフ&#
12398;サンプルです。</
para>
<para>
<blockquote>
<para>システム・スナッ&#
12503;ショットのキャフ&#
65439;ション</para>
</blockquote>
<blockquote>
<para>スコープ・スナッ&#
12503;ショットのキャフ&#
65439;ション</para>
</blockquote>
</para>
</chapter>
</book>