new libreoffice has --version

this should match if first line didn't have a version number i.e. error like: Error: Could not find or load main class .usr.lib.libreoffice or Failed to open display which shows if running headless.
typo fix for win
Merge pull request #74 from sumkincpp/patch-1

typo fix for win
Use String#encode in text_cleaner
Merge pull request #82 from leknarf/master

Clean text without Iconv to support Ruby 2.0
Add /usr/lib64 to office_search_paths

As it's used by Oracle RHEL 6.3 and probably by RHEL in general.
Merge pull request #88 from elia/patch-1

Add /usr/lib64 to office_search_paths
Merge pull request #68 from senner/patch-1

new libreoffice has --version
Updating License file
For the time being, setting language should turn off cleaning.
If UTF-8 encoding isn't valid for InfoExtractor, force the encoding.
Redirect STDERR from help to /dev/null

On libreoffice > 4, the -h flag attempts to open the UI to display the
help, in addition to writing it to stdout.

This means that on Linux without X11 running, the output ends up looking like:
    Failed to open display
    LibreOffice 4.1.1.2 410m0(Build:2)

This behavior can be avoided by using the `--headless` flag, but that
flag isn't supported in older version of OpenOffice, causing an error
there.

Since Docsplit only looks at the first line of output it doesn't find
the version string, causing it to assume it should use OpenOffice in the
extract method. It then attempts to use the JOD convertor, which will
fail on recent versions of LibreOffice.

I believe this is the root cause of issue #71 and should correct it.
Fix the PDFExtractor.version_string's memoization

Looked like there was an attempt to memoize the version_string
in the @@help class var but the cached var was only consulted after
the system call had already been executed.

This caches the results in the @@version_string var.
Update gemspec.
Missed a merge, updating gemspec and pushing gem again.
Check if file is PDF by magic number. Closes #98

See http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/pdf_reference_1-7.pdf page 92
Merge pull request #102 from tmaier/issue-98

Check if file is PDF by magic number. Closes #98
Add office search path to check vendor folder for use with Heroku and libreoffice build pack
Merge pull request #104 from serene/master

Add office search path to check vendor folder for use with Heroku and libreoffice buildpack
making magic number-based detection of PDFs encoding-friendly, with tests

Magic number-based PDF-detection is vulnerable to encoding issues; forcing the first line to be read in binary mode should work across encodings (as the "%PDF" marker will be present using ASCII-7 characters in any case).  Also, removing the "end of line" anchor from the PDF version regex to avoid issues with non-printing characters in certain cases.

Added tests, details:
- extracted PDF detection from ensure_pdfs method for more direct testing
- new unit tests verify that PDFs without the ".pdf" extensions are detected as PDFs
  - samples are included under "test/fixtures/without_pdf_extension"
  - add further PDFs (without extensions) and they will be automatically included in tests
  - PDFs generated by Adobe InDesign previously raised encoding errors; samples (for each recent PDF version) are included
- new unit tests verify that files with the ".pdf" extensions are always detected as PDFs (regardless of file contents)
  - samples are included under "test/fixtures/with_pdf_extension"
  - samples file names reflect actual contents
  - not sure that this is the correct behavior, but not looking to change current approach