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

allow to override TemplateProcessor#ensureUtf8Encoded #1430

Merged
merged 1 commit into from
Dec 3, 2018

Conversation

nicoder
Copy link
Contributor

@nicoder nicoder commented Jul 16, 2018

the method is protected,
but since it is called with self instead of static
it does not allow for subclasses to override it

(we have a special case of mostly ISO-8859-1 strings sometimes containing MS Word apostrophes,
and these appear as question marks in the document when utf8_encode is used,
but are displayed fine when we use mb_convert_encoding($string, 'UTF-8', 'windows-1252'))

An alternative would be to make the ensureUtf8Encoded non static,
since it only appears to be used in a non static method.

the method is `protected`,
but since it is called with `self` instead of `static`
it does not allow for subclasses to override it
@troosan
Copy link
Contributor

troosan commented Jul 19, 2018

indeed, it would make sense to not make that method static. Being a java developer, it feels wrong to override a static method :-S

@troosan troosan added this to the v0.16.0 milestone Dec 3, 2018
@troosan troosan merged commit 7b3b723 into PHPOffice:develop Dec 3, 2018
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.

None yet

2 participants