Skip to content

This is 2012, assume already have UTF8 #13

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

Closed
wants to merge 1 commit into from

Conversation

dvdoug
Copy link

@dvdoug dvdoug commented Oct 18, 2012

There are conversion functions scattered around that assume text is
ISO-8859-1, and does conversion to UTF-8. PHPWord should assume text is
already in UTF-8, and let calling applications do charset conversions if
required because otherwise there is dataloss.

Fixes issue #9

There are conversion functions scattered around that assume text is
ISO-8859-1, and does conversion to UTF-8. PHPWord should assume text is
already in UTF-8, and let calling applications do charset conversions if
required.
@juzi
Copy link

juzi commented Mar 12, 2013

I completely agree. I had to comment all the
$text = utf8_encode($text);

statements.

@lethal-guitar
Copy link

I have the same problem, all my text is already in utf8. The internal conversions should either be removed or made optional via some configuration flag or such. Although the former seems much more flexible to me.

@Progi1984
Copy link
Member

A test for knowing if the text is in UTF-8 would be a solution. It's why PHPWord_Shared_String::IsUTF8() exists.

@Progi1984 Progi1984 closed this Dec 15, 2013
@Progi1984
Copy link
Member

I just commited a improvement. Now, i test if text is in UTF-8 before converting to UTF-8.

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

Successfully merging this pull request may close these issues.

4 participants