Commit graph

67 commits

Author SHA1 Message Date
Abs62 93fba54848 Fix compilation under 64-bit linux 2012-11-29 16:56:55 +04:00
Abs62 9367be34dc Handle tags in insided card header after "~" expanding for dsl dictionaries 2012-11-26 23:17:58 +04:00
Abs62 af1403da2d Handle "^~" combination in dsl dictionaries 2012-11-26 23:16:10 +04:00
Abs62 07cbdb3b02 Handle insided cards in dsl dictionaries 2012-11-22 17:03:07 +04:00
Abs62 8c8642fdfa Call gzrewind() before gzseek() for uncompressed files 2012-11-05 20:05:58 +04:00
Abs62 2a215927ce Fix some warnings 2012-10-31 17:58:35 +04:00
Abs62 0da4b83dd7 Fix keywords per one article limitation for DSL dictionaries 2012-09-08 01:32:49 +04:00
Abs62 535fe0d3e0 Update year in copyright notices. 2012-02-21 01:47:14 +04:00
Abs62 f8151aa338 XDXF support - some improvements 2012-01-25 20:35:00 +04:00
Abs62 2763b74635 Use file names in UTF-8. Fix issue #30. 2011-09-09 16:05:28 +04:00
Denis Loginov a82a96e6af Added full support for both 32- and 64-bit Intel Macs.
The universal binary is now built seamlessly with 'Cocoa: Mac binary package for Mac OS X 10.5-10.6' (works in 10.7 as well).

Signed-off-by: Denis Loginov <dinvlad@gmail.com>
2011-08-07 21:04:53 -04:00
Tvangeste 57a928510c Fix for #23: Failure to index a dictionary in UTF-8 format on Windows.
Here's what happens. At some moment during dictionary conversion,
in DslScanner::readNextLine(), whe call iconv(), when both buffers
are of size 4 (the conversion is from UTF-8 to UTF-16).

Now, the dictionary contains two em-dash symbols at that position,
one after another, each is encoded in 3 bytes in UTF-8. So, the
input buffer of size 4 contains entire first em-dash (3 bytes)
and the first byte from the second em-dash.

Calling iconv() on Linux leads to Iconv::NeedMoreOut (E2BIG),
which makes sense, since we converted the first char and there is
no more space in the output buffer.

Calling iconv() on Windows leads to Iconv::NeedMoreIn (EINVAL),
which *also* makes sense, since we converted the first char, started
to look at the second one and noticed that it is incomplete.

The difference is only what iconv() checks first, the state
of the input or the state of the output. And it seems that it
does different things on Windows and Linux.

The patch takes this into account and resolves the conversion
problem on Windows: the only error condition that requires
to throw an encoding error is when outBytesLeft is non-empty,
that means that iconv didn't convert anything.
2011-07-01 14:21:57 +02:00
Abs62 7de7fcc8df Replace fprintf(stderr,...) in code by a macro FDPRINTF 2011-06-20 00:29:11 +04:00
Konstantin Isakov 92eceb8cad Change email from @users.berlios.de to @goldendict.org. 2010-12-09 15:31:50 +03:00
Konstantin Isakov 953d9237a3 Update copyright to span to 2011.
Better early than late, this year is ending anyway.
2010-11-14 18:47:03 +03:00
Konstantin Isakov 014731fa85 Limit the number of expanded optional parts in DSL to at most 32 to prevent resource exhaustion. 2010-09-28 21:55:53 -07:00
Konstantin Isakov ab88fa4867 Drop the src/ directory. It's superfluous. 2010-05-15 16:42:18 +04:00
Renamed from src/dsl_details.cc (Browse further)