-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
Character set windows-1252 should be CP1252 under Unix #245
Comments
Thanks for reporting. Do you experience any problems because of this or is it just "cosmetics"? |
It just throws a PHP warnings every time a QR bill is created; the generated qr bill however seems to be valid. So it's not a severe problem, it just got me curious because of the growing logs. A solution could perhaps be to get a list of the character sets on the system and chose one of them? |
Could you post the exacting warning that you get? This might help to improve this. |
Here's the warning
And here is the code:
|
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
I suggested a change in #260, but I'm not sure yet if this will be 100% compatible, we need to wait for sprain. In the meanwwhile, I would appreciate if you could test my fix in your environment? To do that, you need to redirect composer to my fork, and then require the branch with the fix: In composer.json add this: (at the top as first item, but inside the root- "repositories": [
{
"type": "vcs",
"url": "https://github.com/kohlerdominik/php-swiss-qr-bill"
}
], Then update the package composer require sprain/swiss-qr-bill:dev-pdf-unsupported-characters |
In /src/PaymentPart/Output/FpdfOutput/FpdfOutput.php, the following code is found:
return iconv('UTF-8', 'windows-1252', $text) ?: '';
Under unix, the character set should be called "CP1252", since "windows-1252" is unknown on most systems. Also I'm not sure if the code is correct, since the funktion name is "toUtf8", but what the code does, is to convert "from" UTF8.
The occurence of "windows-1252" is in several files.
The text was updated successfully, but these errors were encountered: