-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How To Ouptput doc worddocuemt sector? #10
Comments
answered via email |
Ok, same issue now.. |
To get the bytes out of that stream you could do something like this: package main import (
) func main() { BUT "... [this] package only implements the MS-CFB spec (https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-cfb/53989ce4-7b05-4f8d-829b-d08d6148375b) which is a common container format used by a lot of different Windows software. It doesn't implement the MS Word spec (MS-DOC) - so can't help you identify byte ranges of the runs of text in a word doc. To do something like that, you'd need to look at the MS-DOC spec (https://docs.microsoft.com/en-us/openspecs/office_file_formats/ms-doc/d7fae142-670d-4cd5-869a-708366984a71) - you'd probably need to work out how to interpret the File Information Block structure (FIB) at the start of the WordDocument stream to get offsets for where the text entries are in the stream. That's probably quite a bit of work. The other option might be just to iterate over the byte slice and delete any bytes not in the ASCII range (this won't work if the doc stream has UTF16 or some other encoding)? e.g. buf2 := make([]byte, 0, len(buf)) |
as you code
will output unknow code ,
I expect output person read string or text
The text was updated successfully, but these errors were encountered: