-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
Modernize encoding conversion for FPDF #260
Modernize encoding conversion for FPDF #260
Conversation
fce387b
to
fec65e4
Compare
Thanks for the PR 🙌 Some background: The method name So maybe we could call it Regarding the encoding itself, I think your approach here should be fine. But I am no expert on this topic, so it would be great if @supercosh could give it a test run, as mentioned in #245 (comment).
I am not sure if it's really needed. Is there another reason besides unsupported horse emojis? 😁🦓🦓 |
ab5bd7d
to
d85d48b
Compare
d85d48b
to
65ea1c2
Compare
…h mbstring-polyfill
Hi @sprain Thanks for your information, that cleared up a lot. Your link provides information, why this was introduced to For So I just updated my PR. This should be 100% backwards compatible, while fixing #245:
It might change output in edge-cases though, so the release should be tagged accordingly. |
My answer is a bit late, but I can confirm the fix is working. I see that the fix is already in the master and released. Thank you all for the help! |
Fixes #245
I'm not entirly shure what the method
toUtf8
did, but surely not convert to UTF-8. It converted away from UTF-8;my best guess it that it's to replace characters that are not allowed in the payment slip?ISO-8859-1
should be correct here, as the specs require Latin Character Set. But maybe there was a specific reason that the previous characterset was chosen?Also,
iconv
is not able to handle MultiByteCharacters (🦓🦓🦓), so maybe we can fix that by usingmb_*
instead. I explicitly added the Symfonymb_*
-polyfill, as its an indirect dependency anyway, so it will not bloat the package.This PR should be considered as breaking change.