Skip to content
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

"[Invalid encoding]" #39

Open
janpadrta opened this issue Dec 14, 2015 · 1 comment
Open

"[Invalid encoding]" #39

janpadrta opened this issue Dec 14, 2015 · 1 comment

Comments

@janpadrta
Copy link

When I try to Htmltoword::Document.create(content, word_template, extras), I got result "[Invalid encoding]". I went through generate method and I have found out that 4 parts of template (docProps/thumbnail.jpeg, word/fontTable.xml, word/numbering.xml, word/theme/theme1.xml) have encoding ASCII-8BIT and the rest have UTF-8.

I don't know, if this is the problem, because I tried .force_encoding('utf-8') on every part when generating with no result.

@anitsirc
Copy link

Hi, @janpadrta Maybe it has something to do, Word is really strict on that. All the xml files used come from the word template - that is an actual word file that is decompressed modified and compressed again - so I wouldn't mess up with the encoding. What are you trying to force_encode?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants