New user registration is currently disabled due to spam abuse / Регистрация новых пользователей в настоящее время приостановлена из-за злоупотреблений спаммерами

Anyone has a stardict-image supported version of Goldendict

General discussion

Re: Anyone has a stardict-image supported version of Goldend

Postby Abs62 » Fri Dec 30, 2011 6:56 pm

You shouldn't rename 7z files. You should select archive format "zip" in 7z archiver when you compress jpg files. AFAIK, 7z archiver store non-ascii filenames in zip archives in UTF-8 encoding, GoldenDict must handle such archive correctly.
Abs62
 
Posts: 631
Joined: Mon Jun 14, 2010 11:51 am

Re: Anyone has a stardict-image supported version of Goldend

Postby chulai » Fri Dec 30, 2011 6:59 pm

7z and zip are 2 different formats. You cannot just rename the file and expect to work. What Abs62 suggested is that you use 7z archiver program to compress your files into a ZIP file instead of a 7z file (the native compression of 7z archiver).

cgpman wrote:Using goldendict 1.0.1, I just tried renaming the dictionary.dsl.files.7z file to dictionary.dsl.files.zip. That did not help.
chulai
 
Posts: 464
Joined: Sat Jan 08, 2011 10:11 pm

Re: Anyone has a stardict-image supported version of Goldend

Postby cgpman » Fri Dec 30, 2011 9:20 pm

@abs62 and chulai: Please read my earlier posts. I DID use a 7z compression program earlier. Someone's post suggested renaming 7z to zip. I thought that was dumb, but I tried it anyway.

Goldendict does not uncompress 7z compressed jpg files.

Thanks for trying to help, but it is getting tiresome to reply to posters that don't read all the posts I made about this Goldendict problem and to posters who do not read my posts as carefully as I write them.
cgpman
 
Posts: 10
Joined: Tue Dec 20, 2011 8:50 pm

Re: Anyone has a stardict-image supported version of Goldend

Postby Tvangeste » Sat Dec 31, 2011 11:00 am

cgpman wrote:Thanks for trying to help, but it is getting tiresome to reply to posters that don't read all the posts I made about this Goldendict problem and to posters who do not read my posts as carefully as I write them.

Heh, this is fun! 8-)

Actually, the guys were suggesting *not* to rename *.7z to *.zip but to use 7zip tool to create a zip archive. You see, 7zip can create both formats, *.zip and *.7z. And it creates better *.zip archives compared to the official zip archiver and supposedly it can handle non-ASCII files as well.
Tvangeste
 
Posts: 893
Joined: Thu Jun 02, 2011 11:42 am

Re: Anyone has a stardict-image supported version of Goldend

Postby chulai » Sat Dec 31, 2011 8:02 pm

@cgpman, GoldenDict supports unicode filenames in the filesystem or inside zip files. The issue really is that some zip utilities did not support unicode. Luckily, 7-Zip archiver has unicode filenames support.

I have attached 2 files:
1)
7zip-parameters-for-unicode-support.JPG
7-Zip parameters to create a zip archive with unicode support in filenames
7zip-parameters-for-unicode-support.JPG (61.7 KiB) Viewed 9778 times

A screenshot of the parameter and option you have to select to generate a zip archive with unicode support

From http://www.7-zip.org/history.txt:
- Unicode (UTF-8) support for filenames in .ZIP archives. Now there are 3 modes:
1) Default mode: 7-Zip uses UTF-8, if the local code page doesn't contain required symbols.
2) -mcu switch: 7-Zip uses UTF-8, if there are non-ASCII symbols.
3) -mcl switch: 7-Zip uses local code page.


So we are using second parameter to add unicode support.

2)
sample-ascii-unicode.zip
Sample DSL dictionary with 2 images, one with only ascii chars in its filename and the other using non-ascii characters
(43.6 KiB) Downloaded 598 times

A compressed folder with a sample DSL dictionary that has 2 zip files:
I) sample-ascii-unicode.dsl.files.zip.ASCII
this does not support non-ascii characters
II) sample-ascii-unicode.dsl.files.zip.UNICODE
this does support non-ascii characters (ie utf-8 or unicode)

To try one or the other:

a) close GoldenDict if open.
b) remove .ASCII or .UNICODE from the filenames.
c) open GoldenDict.
d) go to Edit > Dictionaries... > Sources > Path and add the path to this dictionary. Do this step only the first time.
e) enter "test" to find the sample entry. You will see the image broken for the unicode filename or it will show a ñandú (bird animal from Argentina, http://en.wikipedia.org/wiki/Rhea_(bird)) depending of which zip file you are trying.

VERY IMPORTANT: you have to delete the index files for this sample dictionary each time you want to try the ASCII zip file or the UNICODE file. If you fail to do this, you would keep seeing the image or not depending on which version you tested first.

FYI, the index file is in the GoldenDict config folder: usually C:\Users\{yourUserId}\AppData\Roaming\GoldenDict\index

BTW, I tested using GoldenDict 1.0.1-182-g1d399aa version at https://github.com/goldendict/goldendic ... or-Windows

Regards,

chulai
chulai
 
Posts: 464
Joined: Sat Jan 08, 2011 10:11 pm

Re: Anyone has a stardict-image supported version of Goldend

Postby cgpman » Sun Jan 01, 2012 3:45 am

Sorry I got testy guys. Now I understand what your posts were suggesting. And thanks, chulai, for the very complete explanation of how to use 7-zip to create a zip file. I had read somewhere on the internet that zip utilities cannot compress files with unicode names, but that was wrong, at least for 7-zip.

I did compress my many jpg files to be displayed in my dictionaries into zip files using 7-zip as chulai described. They work fine with Goldendict 1.0.1.

chulai, I looked at your sample dictionary. Yes, it works as you described. I have not been able to find a complete list of dsl tags (like [s]) or other parts of the dsl language. Does anyone know where such a list is? If not, could you explain what the big dot in the last line of the .dsl file does? And why some [s] tags are preceded by '/' or '\' and some are not in that same line?

Thanks again. My dictionaries are now working fine.
cgpman
 
Posts: 10
Joined: Tue Dec 20, 2011 8:50 pm

Re: Anyone has a stardict-image supported version of Goldend

Postby chulai » Sun Jan 01, 2012 2:10 pm

cgpman wrote:Sorry I got testy guys. Now I understand what your posts were suggesting. And thanks, chulai, for the very complete explanation of how to use 7-zip to create a zip file. I had read somewhere on the internet that zip utilities cannot compress files with unicode names, but that was wrong, at least for 7-zip.

I did compress my many jpg files to be displayed in my dictionaries into zip files using 7-zip as chulai described. They work fine with Goldendict 1.0.1.


Glad it worked for you too.

cgpman wrote:chulai, I looked at your sample dictionary. Yes, it works as you described. I have not been able to find a complete list of dsl tags (like [s]) or other parts of the dsl language. Does anyone know where such a list is? If not, could you explain what the big dot in the last line of the .dsl file does? And why some [s] tags are preceded by '/' or '\' and some are not in that same line?

Thanks again. My dictionaries are now working fine.


My sample dictionary was actually created from the great sample DSL dictionary created and maintained by Tvangeste. He has it hosted at https://github.com/VVSiz/SampleDSL
You can see a forum topic discussing this here: viewtopic.php?f=5&t=1232

Happy New Year,

Chulai
chulai
 
Posts: 464
Joined: Sat Jan 08, 2011 10:11 pm

Previous

Return to General

Who is online

Users browsing this forum: No registered users and 7 guests