2003-10-31 04:07:03 +00:00
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
2003-05-18 15:18:31 +00:00
|
|
|
|
|
|
|
<!-- @author David Chandler -->
|
|
|
|
<!-- @date-created May 18, 2003 -->
|
|
|
|
<!-- @editor Emacs, baby! -->
|
|
|
|
|
|
|
|
|
2003-10-31 04:07:03 +00:00
|
|
|
<head>
|
|
|
|
<title>Tibetan Machine Web Converter</title>
|
2003-05-18 15:18:31 +00:00
|
|
|
|
2003-10-31 04:07:03 +00:00
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
2003-11-01 04:50:02 +00:00
|
|
|
<script type="text/javascript" src="http://iris.lib.virginia.edu/tibet/scripts/thdl_scripts.js"></script>
|
|
|
|
<link rel="stylesheet" type="text/css" href="http://iris.lib.virginia.edu/tibet/style/thdl-styles.css"/>
|
2003-05-18 15:18:31 +00:00
|
|
|
</head>
|
|
|
|
|
2003-10-31 04:07:03 +00:00
|
|
|
<body>
|
2003-05-18 15:18:31 +00:00
|
|
|
|
2003-10-31 04:07:03 +00:00
|
|
|
<div id="banner">
|
2003-11-01 04:50:02 +00:00
|
|
|
<a id="logo" href="http://iris.lib.virginia.edu/tibet/index.html"><img id="test" alt="THDL Logo" src="http://iris.lib.virginia.edu/tibet/images/logo.png"/></a>
|
2003-10-31 04:07:03 +00:00
|
|
|
<h1>The Tibetan & Himalayan Digital Library</h1>
|
2003-05-18 15:18:31 +00:00
|
|
|
|
2003-10-31 04:07:03 +00:00
|
|
|
<div id="menubar">
|
|
|
|
<script type='text/javascript'>function Go(){return}</script>
|
2003-11-01 04:50:02 +00:00
|
|
|
<script type='text/javascript' src='http://iris.lib.virginia.edu/tibet/scripts/new/thdl_menu_config.js'></script>
|
2003-05-18 15:18:31 +00:00
|
|
|
|
2003-11-01 04:50:02 +00:00
|
|
|
<script type='text/javascript' src='http://iris.lib.virginia.edu/tibet/scripts/new/menu_new.js'></script>
|
|
|
|
<script type='text/javascript' src='http://iris.lib.virginia.edu/tibet/scripts/new/menu9_com.js'></script>
|
2003-10-31 04:07:03 +00:00
|
|
|
<noscript><p>Your browser does not support javascript.</p></noscript>
|
|
|
|
<div id='MenuPos' >Menu Loading... </div>
|
|
|
|
</div><!--END menubar-->
|
2003-05-18 15:18:31 +00:00
|
|
|
|
2003-10-31 04:07:03 +00:00
|
|
|
</div><!--END banner-->
|
2003-05-18 15:18:31 +00:00
|
|
|
|
2003-10-31 04:07:03 +00:00
|
|
|
<div id="sub_banner">
|
|
|
|
<div id="search">
|
|
|
|
<form method="get" action="http://www.google.com/u/thdl">
|
|
|
|
<p>
|
|
|
|
<input type="text" name="q" id="q" size="15" maxlength="255" value="" />
|
|
|
|
<input type="submit" name="sa" id="sa" value="Search"/>
|
|
|
|
<input type="hidden" name="hq" id="hq" value="inurl:iris.lib.virginia.edu"/>
|
|
|
|
</p>
|
|
|
|
</form>
|
2003-05-18 15:18:31 +00:00
|
|
|
|
|
|
|
</div>
|
2003-10-31 04:07:03 +00:00
|
|
|
<div id="breadcrumbs">
|
2003-11-01 04:50:02 +00:00
|
|
|
<a href="http://iris.lib.virginia.edu/tibet/index.html">Home</a> > <a href="index.html">Tools</a> > <a href="http://iris.lib.virginia.edu/tibet/tools/software.html">Software</a> > Nightly Builds
|
2003-10-31 04:07:03 +00:00
|
|
|
</div>
|
|
|
|
</div><!--END banner-->
|
2003-05-18 15:18:31 +00:00
|
|
|
|
|
|
|
|
2003-10-31 04:07:03 +00:00
|
|
|
<div id="main">
|
2003-05-18 15:18:31 +00:00
|
|
|
|
2003-05-31 23:17:41 +00:00
|
|
|
<h2>Tibetan Machine Web Converter</h2>
|
2003-05-18 15:18:31 +00:00
|
|
|
|
2003-07-13 17:04:05 +00:00
|
|
|
<p>
|
|
|
|
In recent versions of Jskad, the 'Tools' menu has an option 'Launch
|
|
|
|
Converter...'. If you use that option, you will find a
|
|
|
|
first-class Tibetan-to-Tibetan and Tibetan-to-Wylie converter.
|
|
|
|
That converter has a user-friendly GUI interface, and it tells you
|
|
|
|
when things go wrong (even things as subtle as your having selected
|
|
|
|
the wrong conversion). If you need a command-line interface to
|
|
|
|
that converter, however, read on.
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
In the same JAR file as Jskad, power users will find a command-line
|
|
|
|
utility that converts Tibetan documents from one digital
|
|
|
|
representation to another. The converter embodies the same
|
|
|
|
technology as Jskad itself, but often works even when Jskad fails
|
|
|
|
due to Java's presently poor support for viewing RTF
|
|
|
|
documents. This command-line utility converts a Tibetan
|
|
|
|
Machine Web-encoded (TMW-encoded) Rich Text Format (RTF) file to
|
|
|
|
either of these three output formats:
|
|
|
|
</p>
|
|
|
|
|
2003-05-18 15:18:31 +00:00
|
|
|
<p>
|
|
|
|
In the same JAR file as Jskad, power users will find a command-line
|
2003-06-21 22:28:14 +00:00
|
|
|
utility that converts Tibetan documents from one digital
|
|
|
|
representation to another. The converter embodies the same
|
|
|
|
technology as Jskad itself, but often works even when Jskad fails
|
|
|
|
due to Java's presently poor support for viewing RTF
|
|
|
|
documents. This command-line utility converts a Tibetan
|
|
|
|
Machine Web-encoded (TMW-encoded) Rich Text Format (RTF) file to
|
|
|
|
either of these three output formats:
|
2003-05-18 15:18:31 +00:00
|
|
|
</p>
|
2003-05-31 23:17:41 +00:00
|
|
|
<ul>
|
2003-06-15 20:27:56 +00:00
|
|
|
<li>RTF files in Unicode</li>
|
2003-05-31 23:17:41 +00:00
|
|
|
<li>RTF files with the appropriate THDL Extended Wylie (Wylie) used
|
|
|
|
instead of TMW</li>
|
|
|
|
<li>RTF files in Tibetan Machine (used in legacy systems)</li>
|
|
|
|
</ul>
|
2003-05-18 15:18:31 +00:00
|
|
|
|
2003-06-08 22:43:43 +00:00
|
|
|
<p>
|
|
|
|
In addition, this converter can convert Tibetan Machine RTF files to
|
2003-06-15 20:27:56 +00:00
|
|
|
Tibetan Machine Web RTF files, and takes precautions to ensure that
|
|
|
|
only a 100% perfect conversion is done in both directions
|
|
|
|
(TM->TMW and TMW>TM). One such precaution is that two
|
|
|
|
independent teams (Garrett and Garson, Chandler) turned the Tibetan
|
|
|
|
Machine Web <a
|
|
|
|
href="http://iris.lib.virginia.edu/tibet/tools/tmw.html#doc">
|
|
|
|
documentation</a> into TM<->TMW tables. These tables
|
|
|
|
were compared, giving full confidence that the tables are as
|
|
|
|
accurate as the documentation (which has a <a
|
|
|
|
href="http://sourceforge.net/tracker/index.php?func=detail&aid=746871&group_id=61934&atid=502515">
|
|
|
|
few flaws</a> itself). That documentation has not been
|
|
|
|
extensively verified against the actual fonts, however.
|
|
|
|
Another precaution is that any unknown characters cause the
|
|
|
|
conversion to fail, and the result is a document containing merely
|
|
|
|
the unknown characters. (There are some known, illegal glyphs
|
|
|
|
created by Tibet Doc, and the converter handles the ones it knows of
|
|
|
|
and treats the rest as unknown.)
|
2003-06-08 22:43:43 +00:00
|
|
|
</p>
|
|
|
|
|
2003-05-18 15:18:31 +00:00
|
|
|
<p>
|
|
|
|
This converter is smart enough to solve the "curly-brace
|
2003-06-15 20:27:56 +00:00
|
|
|
problem", wherein Tahoma '{', '}', and '\' characters appear
|
|
|
|
instead of the TMW stacks they are supposed to represent. This
|
|
|
|
problem originates with certain versions of Microsoft Word's Rich
|
|
|
|
Text Format writing capabilities.
|
2003-05-18 15:18:31 +00:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
Further, this converter gives a polite error message when a given
|
|
|
|
.rtf file simply cannot be read by the version of Java used.
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
Perhaps most importantly, the converter has a
|
|
|
|
<tt>--find-some-non-tmw</tt> mode of operation that gives you, the
|
|
|
|
user, confidence that RTF reading and writing idiosyncrasies are not
|
|
|
|
going to interfere with a flawless conversion. It does so by
|
|
|
|
printing out the first occurrence of a given character in a non-TMW
|
|
|
|
font. Here is some example output:
|
|
|
|
</p>
|
|
|
|
<pre>
|
2003-06-21 22:28:14 +00:00
|
|
|
java -cp "c:\my thdl tools\Jskad.jar" \
|
2003-06-15 20:27:56 +00:00
|
|
|
org.thdl.tib.input.TibetanConverter \
|
2003-05-18 15:18:31 +00:00
|
|
|
--find-some-non-tmw \
|
|
|
|
"Dalai Lama Fifth History 01.rtf"
|
2003-06-21 22:28:14 +00:00
|
|
|
|
2003-06-22 00:13:57 +00:00
|
|
|
Non-TMW character newline [decimal 10] in the font Tahoma appears first at location 39
|
|
|
|
Non-TMW character ' ' [decimal 32] in the font TimesNewRoman appears first at location 45
|
|
|
|
Non-TMW character '}' [decimal 125] in the font Tahoma appears first at location 66
|
|
|
|
Non-TMW character '{' [decimal 123] in the font Tahoma appears first at location 219
|
|
|
|
Non-TMW character '\' [decimal 92] in the font Tahoma appears first at location 1237
|
|
|
|
Non-TMW character newline [decimal 10] in the font Times New Roman appears first at location 9754
|
2003-05-18 15:18:31 +00:00
|
|
|
</pre>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
Given the above output, you can be sure that a flawless conversion
|
|
|
|
(barring the appearance of <a href="#knownbugs">known bugs</a>) will
|
2003-06-21 22:28:14 +00:00
|
|
|
result when you run <tt>java -cp "c:\my thdl tools\Jskad.jar"
|
|
|
|
org.thdl.tib.input.TibetanConverter --to-wylie "Dalai Lama Fifth
|
|
|
|
History 01.rtf" > "Dalai Lama Fifth History 01 in THDL Extended
|
|
|
|
Wylie.rtf"</tt>. (Note that the '>' causes the output to be
|
|
|
|
directed to the file named thereafter; this is quite handy.)
|
|
|
|
This is because the only text in the input file besides Tibetan is
|
|
|
|
whitespace and the Tahoma characters <tt>'{'</tt>, <tt>'}'</tt>, and
|
|
|
|
<tt>'\'</tt>. These Tahoma characters are understood by the tool;
|
|
|
|
they are symptoms of the "curly-brace problem".
|
2003-05-18 15:18:31 +00:00
|
|
|
</p>
|
|
|
|
|
2003-06-15 20:27:56 +00:00
|
|
|
<h3>Failed Conversions</h3>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
In this section, you'll learn how to tell if a conversion has
|
|
|
|
succeeded in full, ran into minor problems, or failed altogether.
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<h4>TMW to Wylie</h4>
|
|
|
|
|
2003-07-13 23:19:28 +00:00
|
|
|
<p>
|
|
|
|
<font color="red">
|
|
|
|
This section is too up-to-date -- this is documenting plans for the
|
|
|
|
future. At present, an error message like
|
|
|
|
<code><<[[JSKAD_TMW_TO_WYLIE_ERROR_NO_SUCH_WYLIE: Cannot
|
|
|
|
convert DuffCode <duffcode font=TibetanMachineWeb7 charNum=72
|
|
|
|
character=H/> to THDL Extended Wylie. Please see the
|
|
|
|
documentation for the TMW font and transcribe this
|
|
|
|
yourself.]]>></code> appears.
|
|
|
|
</font>
|
|
|
|
</p>
|
|
|
|
|
2003-05-18 17:18:27 +00:00
|
|
|
<p>
|
|
|
|
Note that some TMW glyphs have no transliteration in Exteded
|
2003-06-21 22:28:14 +00:00
|
|
|
Wylie. When you encounter such a glyph, you'll find
|
|
|
|
<tt>\tmwXYYY</tt> in your output, where X tells you which TMW font
|
|
|
|
the troublesome glyph comes from and YYY is the decimal number of
|
|
|
|
the glyph in that font (which is a number between 000 and 255
|
|
|
|
inclusive, usually between 33 and 126). The following are
|
|
|
|
values corresponding to X:
|
2003-05-18 17:18:27 +00:00
|
|
|
</p>
|
|
|
|
|
2003-06-21 22:28:14 +00:00
|
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
When X is 0, the TibetanMachineWeb font contains the glyph.
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
When X is 1, the TibetanMachineWeb1 font contains the glyph.
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
When X is 2, the TibetanMachineWeb2 font contains the glyph.
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
When X is 3, the TibetanMachineWeb3 font contains the glyph.
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
When X is 4, the TibetanMachineWeb4 font contains the glyph.
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
When X is 5, the TibetanMachineWeb5 font contains the glyph.
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
When X is 6, the TibetanMachineWeb6 font contains the glyph.
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
When X is 7, the TibetanMachineWeb7 font contains the glyph.
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
When X is 8, the TibetanMachineWeb8 font contains the glyph.
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
When X is 9, the TibetanMachineWeb9 font contains the glyph.
|
|
|
|
</li>
|
|
|
|
</ul>
|
2003-05-18 17:18:27 +00:00
|
|
|
|
|
|
|
<p>
|
2003-06-21 22:28:14 +00:00
|
|
|
Upon finding a <tt>\tmwXYYY</tt> sequence in your output, you should
|
|
|
|
consult the <a
|
2003-05-18 17:18:27 +00:00
|
|
|
href="http://iris.lib.virginia.edu/tibet/tools/tmw.html#doc">
|
|
|
|
documentation</a> for the specific TMW font named. Find the
|
2003-06-21 22:28:14 +00:00
|
|
|
glyph (by its YYY value) and decide how to proceed. If you
|
|
|
|
find a glyph that you believe should have been converted into
|
|
|
|
Extended Wylie by the tool, please report this as a bug through the
|
|
|
|
SourceForge website or via e-mail.
|
2003-05-18 17:18:27 +00:00
|
|
|
</p>
|
|
|
|
|
2003-06-15 20:27:56 +00:00
|
|
|
<h4>Other Conversions</h4>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
The other conversions are all-or-nothing. That is, if you run
|
|
|
|
into any trouble whatsoever, the result will be a file containing
|
2003-06-23 02:04:31 +00:00
|
|
|
just the problematic glyphs, each preceded by achen (i.e., U+0F68,
|
|
|
|
the letter whose THDL Extended Wylie representation is 'a').
|
2003-06-29 03:49:13 +00:00
|
|
|
These glyphs will be bracketed on the left by U+0F3C (for which the
|
|
|
|
THDL Extended Wylie is '(') and on the right by U+0F3D (for which
|
|
|
|
the THDL Extended Wylie is ')'). If your result is as long as
|
|
|
|
your input, then the conversion went flawlessly.
|
2003-06-15 20:27:56 +00:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
2003-06-21 22:28:14 +00:00
|
|
|
There is one TMW glyph (TibetanMachineWeb7, glyph 91 [\tmw7091])
|
|
|
|
that has no Tibetan Machine equivalent. This glyph is the only
|
|
|
|
TMW glyph that can cause a TMW->TM conversion to fail. It
|
|
|
|
is fairly common, though, especially if you've used Jskad to prepare
|
|
|
|
your document. It might be appropriate to change the document
|
|
|
|
to use TibetanMachineWeb7, glyph 90 [\tmw7090], a similar glyph that
|
|
|
|
does have a TM equivalent.
|
2003-06-15 20:27:56 +00:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
You might consider using Jskad to convert documents that give
|
|
|
|
errors, as it has better error reporting and can tell you just
|
|
|
|
what's wrong.
|
|
|
|
</p>
|
2003-05-31 23:17:41 +00:00
|
|
|
<p>
|
2003-06-15 20:27:56 +00:00
|
|
|
If you ever encounter problems in a TM->TMW conversion, please
|
|
|
|
send us mail with the error report (and the problem input document's
|
2003-06-21 22:28:14 +00:00
|
|
|
resulting document) so that we can improve our tools.
|
2003-05-31 23:17:41 +00:00
|
|
|
</p>
|
|
|
|
|
2003-05-18 15:18:31 +00:00
|
|
|
<h3>Invoking the Converter</h3>
|
|
|
|
|
|
|
|
<p>
|
2003-06-21 22:28:14 +00:00
|
|
|
First add Jskad.jar to your CLASSPATH. You can do this by
|
|
|
|
setting an environment variable CLASSPATH to contain the absolute
|
|
|
|
path of the Jskad.jar file and then running the command <tt>java
|
|
|
|
org.thdl.tib.input.TibetanConverter</tt>. Alternatively, you
|
|
|
|
can use <code>java -cp "c:\my tibetan documents\Jskad.jar"
|
|
|
|
org.thdl.tib.input.TibetanConverter</code> where you put in the
|
|
|
|
appropriate path to Jskad.jar. You will see usage information
|
|
|
|
appear if you do this correctly; you'll see a message like
|
|
|
|
<code>java.lang.NoClassDefFoundError:
|
|
|
|
org/thdl/tib/input/TibetanConverter; Exception in thread
|
|
|
|
"main"</code> if you've not correctly told Java where to find
|
|
|
|
Jskad.jar.
|
2003-05-18 15:18:31 +00:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<h3><a name="knownbugs"></a>Known Bugs</h3>
|
|
|
|
|
|
|
|
<p>
|
2003-06-21 22:28:14 +00:00
|
|
|
All known bugs are listed in this section. They're more likely
|
|
|
|
to be fixed if users complain, so complain away.
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
2003-07-13 23:19:28 +00:00
|
|
|
There are no known bugs at present.
|
2003-05-18 15:18:31 +00:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
Please
|
|
|
|
|
|
|
|
<a href="mailto:thdltools-devel@lists.sourceforge.net">
|
|
|
|
e-mail us</a>
|
|
|
|
|
|
|
|
your comments about this page.
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
The
|
2003-10-31 04:07:03 +00:00
|
|
|
<a href="http://www.sourceforge.net/projects/thdltools">
|
2003-05-18 15:18:31 +00:00
|
|
|
THDL Tools</a>
|
|
|
|
project is generously hosted by:
|
|
|
|
<!--
|
|
|
|
|
|
|
|
DO NOT DELETE THE SF.NET LOGO.
|
|
|
|
|
|
|
|
We have a choice of colors and sizes for this logo (see
|
|
|
|
"https://sourceforge.net/docman/display_doc.php?docid=790&group_id=1"),
|
|
|
|
but we do not have the option of removing it. SourceForge requests
|
|
|
|
that we put it on each web page for our project, and to give us
|
|
|
|
incentive to do so, they will not track the number of hits for our
|
|
|
|
project web pages unless we put this link in. To track hits, see
|
|
|
|
"http://sourceforge.net/project/stats/index.php?report=months&group_id=61934".
|
|
|
|
|
|
|
|
-->
|
2003-10-31 04:07:03 +00:00
|
|
|
<a href="http://sourceforge.net/">
|
2003-05-18 15:18:31 +00:00
|
|
|
<img src="http://sourceforge.net/sflogo.php?group_id=61934&type=1"
|
2003-10-31 04:07:03 +00:00
|
|
|
width="88" height="31" alt="SourceForge Logo" />
|
2003-05-18 15:18:31 +00:00
|
|
|
</a>
|
|
|
|
<!-- AGAIN, DO NOT DELETE THE SF.NET LOGO. -->
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|