Giter VIP home page Giter VIP logo

Comments (6)

michaelweber avatar michaelweber commented on May 24, 2024 6

Just ran into this while using the library. The problem is in

result = result.Remove(result.IndexOf("\0"));
.

Document metadata streams begin with a unicode character like "\u0005DocumentSummary\0\0\0\0\0\0". In windows, if you call .IndexOf("\0") on that string, it will treat the "\u0005" as a single unmatching character and return the index of the first \0 after DocumentSummary. In Linux, the null byte that is part of the "\u0005" character will get detected and it will delete everything after the initial byte.

Just replace the result = result.Remove(result.IndexOf("\0")); line with result = result.TrimEnd('\0'); and it works fine.

from b2xtranslator.

lansdon2 avatar lansdon2 commented on May 24, 2024 1

The fix by michaelweber helped get past this error on .NET 6. Are there updates to nuget planned?

from b2xtranslator.

KeithHenry avatar KeithHenry commented on May 24, 2024

Cheers for the feedback @NamelessHH!

As a first step please could you add a unit test to the testing project that throws the exception you're seeing? That will give us a starting point for the issue. Thanks.

from b2xtranslator.

fergalmoran avatar fergalmoran commented on May 24, 2024

I get this issue when running on Linux - same code works fine on Windows.
I haven't had time to investigate much but from what I can see the issue is with
StructuredStorageReader._directory - in Linux, the name property of all the entries is string.Empty.

from b2xtranslator.

tomaszzmuda avatar tomaszzmuda commented on May 24, 2024

@fergalmoran
Have you found whatt casuses the issue?

from b2xtranslator.

fergalmoran avatar fergalmoran commented on May 24, 2024

@tomaszzmuda - sorry, no. I gave up and used libreoffice api instead.

from b2xtranslator.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.