Summary: | FILEOPEN: FB2 files encoded in windows-1251 don't open on Windows | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | ya.buldozer |
Component: | Writer | Assignee: | Not Assigned <libreoffice-bugs> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | dtardon |
Priority: | medium | ||
Version: | 4.2.5.2 release | ||
Hardware: | Other | ||
OS: | Windows (All) | ||
Whiteboard: | BSA | ||
Crash report or crash signature: | Regression By: | ||
Attachments: | The attached file to check stored in different encodings |
Description
ya.buldozer
2014-07-17 11:54:08 UTC
AFAIK the problem is in libxml2, which only handles a few major encodings internally and uses libiconv for all the others. But we do not bundle libiconv, only libxml2, and libiconv is not generally available on Windows. There are three possible solutions: 1. We bundle libiconv with libreoffice (on Windows only; could even be pre-built, I think) 2. I work-around this in libe-book by converting the input to UTF-8 before passing it to libxml2. This would mean also changing the input, as the encoding is recorded in XML declaration, so I would really like to avoid having to do this. (But it is possible that libxml2 allows to override the encoding recorded in the XML input. Then this would probably be the easiest solution.) 3. (Speculation) There might be a way to "plug" a different encoding converter into libxml2; then I might use ICU which libe-book already depends on anyway. (In reply to comment #1) > AFAIK the problem is in libxml2, which only handles a few major encodings > internally and uses libiconv for all the others. But we do not bundle > libiconv, only libxml2, and libiconv is not generally available on Windows. > There are three possible solutions: > > 1. We bundle libiconv with libreoffice (on Windows only; could even be > pre-built, I think) > 2. I work-around this in libe-book by converting the input to UTF-8 before > passing it to libxml2. This would mean also changing the input, as the > encoding is recorded in XML declaration, so I would really like to avoid > having to do this. (But it is possible that libxml2 allows to override the > encoding recorded in the XML input. Then this would probably be the easiest > solution.) > 3. (Speculation) There might be a way to "plug" a different encoding > converter into libxml2; then I might use ICU which libe-book already depends > on anyway. Again sorry for my english Thank you. I replaced the library catalog on the library libreoffice taken here with this address: http://www.zlatkovic.com/libxml.en.html All earned. (In reply to comment #1) > 3. (Speculation) There might be a way to "plug" a different encoding > converter into libxml2; then I might use ICU which libe-book already depends > on anyway. Actually libxml2 can already use ICU instead of libiconv. So all that is needed is to build the bundled libxml2 with ICU support on Windows. This will solve this bug and several others too (bug 63756). |