]> git.lyx.org Git - features.git/commitdiff
Sometimes, iconv on windows returns -1, but sets errno to 0. I do not
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 24 Apr 2009 12:28:00 +0000 (12:28 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 24 Apr 2009 12:28:00 +0000 (12:28 +0000)
know what this means, but tex2lyx did not like it at all.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29392 a592a061-630c-0410-9148-cb99ea01b6c8

src/support/docstream.cpp

index 4e3d28fb15f009feb0f3bf66fdc90550079b4828..ed2ddfe88b4bd6f8c1323f003c9c28c4e104dff3 100644 (file)
@@ -281,6 +281,14 @@ private:
                                inbytesleft, to, outbytesleft);
                if (converted == (size_t)(-1)) {
                        switch(errno) {
+                       case 0: 
+                               // As strange as it may seem, this
+                               // does happen on windows when parsing
+                               // comments with accented chars in
+                               // tex2lyx. See the following thread
+                               // for details
+                               // http://thread.gmane.org/gmane.editors.lyx.devel/117636
+                               break;
                        case EINVAL:
                        case E2BIG:
                                return base::partial;