@rkomar so am I, the only relatively sane way I found to run the converter.exe was by building a Docker image with wine32 in it.
Code:
FROM debian:bookworm-slim
RUN dpkg --add-architecture i386 && \
apt-get update && apt-get install -y --no-install-recommends wine wine32
WORKDIR /data
ENTRYPOINT ["wine", "converter.exe"]
So in case there's an issue, the debugging workflow is as follows:
- run the original converter (docker run -v $(pwd):/data pb-converter input.xdxf meta/), rename the output file to input.orig.dic
- run the new converter (./pbdt convert input.xdxf --meta-dir=meta/)
- run ./pbdt show sdic index on both files
- run ./pbdt show sdic block <file.dic> <offset> on two similar blocks (lists the keys) and feed it into vimdiff or the like to compare block contents
- finally, there's ./pbdt lookup --debug command for checking raw definition bytes
The converted files are very similar, but usually not byte-to-byte identical due to:
- non-stable sorting of words with the same collated key in the original converter
- minor differences in selecting block boundaries
- treatment of special XML characters - I didn't pay much attention to this
- not yet discovered bugs