namndev/QDict

Internal links (bword://) don't work

Opened this issue · 4 comments

ilius commented

Internal links in StarDict format, like <a href="bword://二十八宿">二十八宿</a>, don't work for Unicods (non-ASCII) words.
I think link target needs to be unquoted.
Screenshots:
Before click

After click (on first Related word for example)
After click

ilius commented

In Python, it's done with urllib.parse.unquote function.

ilius commented

In Java:

word = URLDecoder.decode(word, "UTF-8");
qnr5 commented

@ilius Hi, I am making a stardict dictionary. I use stardict-tools/tabfile to generate files to use in StarDict. I want internal links, which I guess should be something like: other. But it did not work, and I do not know how to realise. It's a great help if you could give me some advice.

  1. Is internal link supported by StarDict?
  2. Should I write other in example.tab? or example.xml?

Any advice is OK, thanks for your time.

qnr5 commented

When I change "sametypesequence=m" to "sametypesequence=h", it works as I want.

And, also pretty thank you for your reply. Have a good day!