EasyWorship - Chinese Union Version (Traditional)
UPDATE 20/11/2024: A new approach, which allows for the encoding of EasyWorship Bibles from scratch, can be found in my new post
EasyWorship is a popular church presentation software (and the software of choice for my church), but it has a peculiar limitation: it only supports the Chinese Union Version (Simplified) Bible - otherwise known as CUVS, leaving out the Traditional Chinese version (CUV). The Simplified version has been available for nearly a decade, but requests for the Traditional version seem to have been ignored. The EW development team appears to be focused on other priorities, leaving many churches in regions that use Traditional Chinese (e.g. Hong Kong and Taiwan) without a solution other than copying and pasting from other sources.
One potential solution to the issue would be for EW to allow users to import their own Bible translations. However, for some peculiar reason, this wasn’t implemented and they chose to use encode Bible versions which are specifically designed for the software.
I didn’t really want to wait for something that probably wouldn’t end up being delivered - so with some free time on my hands, I decided to try my hand at semi-reverse-engineering their EWB files, which as their name suggests, stores EasyWorship Bibles. The result of a night’s work is a Python script which takes the existing CUVS Bible, converts the Simplified Chinese characters into Traditional Chinese characters, then re-encodes it into the EWB format as an add-in Bible. We are using the opencc-python-reimplemented library to convert from Simplified to Traditional characters
The new EWB format is just an SQLite database, with Bible verses being stored as ZLib compressed data in a blob per book. This made it easy to modify CUVS to CUV - the main challenge was to get EW to recognise this was a new add-in Bible, which took some time poking through the hex values everywhere.
Quick summary:
- Go through the ‘stream’ table, using ZLib decompression to extract the text for each book, OpenCC to convert from SC to TC, then compressing this new TC text using ZLib
- Go through the ‘books’ table, using OpenCC to convert the book name from SC to TC, and updating the pointers in the ‘verse_info’ attribute to point to our new Bible. This is done so that EW knows what text belongs to which verse in this specific Bible translation
- Go through the ‘words’ table, using OpenCC to convert each word from SC to TC. This table appears to be used for searching for Bible verses by characters or words
- Set the new Bible ID and name in the ‘header’ table so EW knows what Bible translation this is
I won’t distribute this modified Bible translation here, but you can find the script to generate your own CUV (Traditional) EW Bible below. You can find the necessary EWB files on the EW website. Hopefully someone is able to also reverse-engineer the data stored in the ‘verse_info’ attributes, which would allow for custom encoding of EW Bible translations and eliminate the need to wait (forever) for Bible requests to be implemented. Note: the ‘book_info’ attribute in the ‘books’ table seems to be the same for each book in every Bible translation - I assume it only stores information such as amount of chapters and verses, which would make sense as this type of data wouldn’t change across Bible translations.
1 | import sqlite3 |
There also appears to be an issue with the existing CUVS Bible. The character ‘冇’ is encoded as ‘有’ throughout the entire Bible translation - a quick search through the CUVS reveals that this character does not appear at all in the CUV and confirms this is a genuine error. A pretty major oversight at that - ‘冇’ essentially means the exact opposite of ‘有’ (‘to not have’ vs ‘to have’)
Nothing that a script can’t fix though - here’s one to make the necessary corrections, which you should probably run before converting CUVS to CUV (Traditional). If there happens to be more discovered and confirmed, you can always add it to the dictionary and re-run the script!
1 | import sqlite3 |