[sword-devel] imp2ld encoding problem

Yiguang Hu yighu at yahoo.com
Mon Nov 21 12:30:45 MST 2005


I ran into Encoding problem when I tried to use imp2ld
to convert a Chinese theology terms/Encyclopedia into
the module
that sword can use. The input text file is a UTF-8
encoded with the format:
$$$English KeyWord Chinese Translation
The meaning of the term
$$$....
For example:
$$$Abbess 女修道院長

 為女修道院之女領袖,其職任不如男修道院長設立之早,其權亦不如男修道院長之大。有時亦管理男修道院。
$$$Abbey 修道院

 又稱*Monastery。原為一修道士團之名稱,由一位院長管理。以後他們所居住之屋宇、禮拜堂等,概稱為修道院。
$$$Abbot 修道院長

 為修道院領袖之稱,意即父也。修道院長原係平信徒,從第七世紀起,教會定為聖職。通常為其本院弟兄所選舉,其職任乃終身。
$$$Abbot, George
阿波特(1562-1633)

 英國教宗;坎特布里大主教;*聖經欽定本的合編者。
$$$Abelard, Peter or Abailard
亞比拉(1079-1142)

I used imp2ld to generate the module. There were many
errors about invalid characters. But it neverthless
generated the module. The problem is the module
characters are saved in wrong encoding. I tried
different encodings to read and none of them make the
charater understandable as shown below:
Abbey 修道院

 又稱*Monastery。原為一修道士團之名稱,由一位院長管理。以後他們所å±
住之屋宇、禮拜堂等,概稱為修道院。

Abbot 修道院長

 為修道院領袖之稱,意即父也。修道院長原係平信徒,從第七世紀起,教會定為聖職。通常為å
¶æœ¬é™¢å¼Ÿå
„所選舉,å
¶è·ä»»ä¹ƒçµ‚身。

Abbot, George 阿波特(1562-1633)

Does anyone experience this and knows how to solve
this problem?

BTW, I have a couple of short java programs that
generate the above format Dictionary file and Bible
text so you can use impl2vs and impl2ld to convert
them into sword modules. I will be glad to put the
code some where for share if someone interest in it.
Thanks
Yiguang
--- sword-devel-request at crosswire.org wrote:

> Send sword-devel mailing list submissions to
> 	sword-devel at crosswire.org
> 
> To subscribe or unsubscribe via the World Wide Web,
> visit
> 
>
http://www.crosswire.org/mailman/listinfo/sword-devel
> or, via email, send a message with subject or body
> 'help' to
> 	sword-devel-request at crosswire.org
> 
> You can reach the person managing the list at
> 	sword-devel-owner at crosswire.org
> 
> When replying, please edit your Subject line so it
> is more specific
> than "Re: Contents of sword-devel digest..."
> 
> 
> Today's Topics:
> 
>    1. Re: Sources for certain modules. (Roberto C.
> Sanchez)
>    2. SwordModuleCreator (William Canfield)
>    3. Re: SwordModuleCreator (Greg Hellings)
> 
> 
>
----------------------------------------------------------------------
> 
> Message: 1
> Date: Sun, 20 Nov 2005 15:55:39 -0500
> From: "Roberto C. Sanchez"
> <roberto at familiasanchez.net>
> Subject: Re: [sword-devel] Sources for certain
> modules.
> To: sword-devel at crosswire.org
> Message-ID:
> <20051120205539.GC10722 at miami.familiasanchez.net>
> Content-Type: text/plain; charset="us-ascii"
> 
> On Sun, Nov 20, 2005 at 12:00:53AM -0500, DM Smith
> wrote:
> > Roberto,
> > 
> > Every book is in a special Sword module format.
> The ones with z in the 
> > extension are compressed. The first letter
> indicates whether the compression is 
> > at a chapter (i.e. c) or a book (i.e. b) level or
> a verse level (i.e. v), but 
> > there are none at a verse level.
> > 
> > The text that is contained by a module may be
> plain text, gbf format, ThML 
> > format or OSIS format. The Sword and JSword
> libraries know how to extract the 
> > text in a meaningful way. There are linux
> applications that use these 
> > libraries. Also, the libraries provide the ability
> to download the modules from 
> > the crosswire website and install it to the user's
> machine.
> > 
> > You can obtain the modules here: 
> >
>
http://www.crosswire.org/ftpmirror/pub/sword/packages/rawzip/
> > Please, ignore the files that are zero length.
> There are no modules for them. 
> > They represent books under copyright for which we
> would love to have permission 
> > to have and distribute.
> > 
> > Hope this helps,
> >    DM
> > 
> 
> Thanks.  The information you provided was just what
> I needed.  The
> packages I am preparing should uploaded to Debian
> soon.
> 
> -Roberto
> 
> -- 
> Roberto C. Sanchez
> http://familiasanchez.net/~roberto
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: not available
> Type: application/pgp-signature
> Size: 189 bytes
> Desc: not available
> Url :
>
http://www.crosswire.org/pipermail/sword-devel/attachments/20051120/608478a9/attachment-0001.bin
> 
> ------------------------------
> 
> Message: 2
> Date: Mon, 21 Nov 2005 13:31:15 +0100
> From: "William Canfield" <canfield at nord-com.net>
> Subject: [sword-devel] SwordModuleCreator
> To: <sword-devel at crosswire.org>
> Message-ID:
> <000e01c5ee97$8b473820$d638e450 at enterprise>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> Hello All,
> Another version of SwordModuleCreator is on
> Sourceforge.
> I have now added a project file for each module.
> This enables each project (module) to have its own
> settings (compiler, dictionary etc) without having
> to remember what the settings were. This also means
> that each project can have multiple text files for
> those larger reference works. All text files will be
> compiled into one and the same Sword module. Also,
> all six compilers have been included into the
> program (xml2gbs, thml2gbs, imp2vs etc). 
> 
> Please remember  that this utility is work in
> progress, and while I have tested xml2gbs and
> thml2gbs, I have not as yet thoroughly tested the
> other compilers. If anyone is daredevil enough to
> test it with a bible text, then I would be
> interested in the results. Preparing a complete
> bible even in vpl would take me a lot of time,
> though I am working on one to test with.
> 
> Another little feature I've included is in the conf
> dialog - When you choose the module driver onthe
> module tab, the Path entry automatically changes to
> the sword module path for that driver. These
> directories are presently hard-coded as I assume the
> paths are always the same within the sword project
> branch. If linux uses a different set of directories
> let me know and I will make provision for these.
> 
> Also the files menu has been altered to reflect the
> new project features. Each new, open and save option
> has a project and file sub-menu so that either the
> project or text file can be generated, opened or
> saved.
> 
> Have fun!
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
>
http://www.crosswire.org/pipermail/sword-devel/attachments/20051121/eefb743f/attachment-0001.html
> 
> ------------------------------
> 
> Message: 3
> Date: Mon, 21 Nov 2005 07:47:38 -0500
> From: Greg Hellings <greg.hellings at gmail.com>
> Subject: Re: [sword-devel] SwordModuleCreator
> To: "SWORD Developers' Collaboration Forum"
> 	<sword-devel at crosswire.org>
> Message-ID:
> 
>
<75a952c00511210447g776f988dq3e9bc98a94bde0f6 at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> William,
> 
> Wow, it sounds like you are pouring a lot of energy
> and time into that
> effort. It certainly is a great effort and help to
> the community. As for
> creating a Bible text that you might use - isn't
> there a tool that would
> spit out the vpl version of a Bible? I think there
> is a tool mod2vpl or
> something along that will give you out the module in
> a vpl format (also
> mod2osis and mod2imp available). I don't know if
> there are Windows ports of
> them, but that might expediate the process of your
> testing if you can get
> them to work for you.
> 
> --Greg
> 
> On 11/21/05, William Canfield
> <canfield at nord-com.net> wrote:
> >
> > Hello All,
> > Another version of SwordModuleCreator is on
> Sourceforge.
> > I have now added a project file for each module.
> This enables each project
> > (module) to have its own settings (compiler,
> dictionary etc) without having
> > to remember what the settings were. This also
> means that each project can
> > have multiple text files for those larger
> reference works. All text files
> > will be compiled into one and the same Sword
> module. Also, all six compilers
> > have been included into the program (xml2gbs,
> thml2gbs, imp2vs etc).
> >  Please remember that this utility is work in
> progress, 
=== message truncated ===




	
		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com


More information about the sword-devel mailing list