Skip to content

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