-
Notifications
You must be signed in to change notification settings - Fork 309
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
parsefnc with iso-8859-15 seems not to work for pdf417 #308
Comments
Set the |
Hi @metafloor, thanks for the quick response. Now I set the option as follow: where "myText" is always of this form: "^ECI000017" + valueString. Unfortunatly nothing have changed. Same problems: |
What version of bwip-js are you using? Also, please provide the output from this code for a failing
I need the output for my testing and to verify the 8859 encoding. |
Hi @metafloor, we used last version of 3.x. I just udated to 4.1.1 but we have a problem with the toCanvas method. "Property 'toCanvas' does not exist on type 'typeof BwipJs'." |
Likely pulling in the node-js package. Does angular support the |
finally we were able to work with the version 4.1.1. adding binarytext to true we receive the following error: without we have as output from your console.log this: |
If you look closely at the console output, you will see a euro character in |
Sure I can see the euro character =) But that was the output before to pass the string inside the toCanvas method. If we have a text without euro symbol (using binarytext = true) we don't have problem with any characters and also umlaut chars are displayed correctly in the barcode. (So this fix the first problem that we have).
we tried to pass the text preprocessing it with a library that convert it to iso-8859-15, or pass it in utf-8 but in both ways we have the same error with euro symbol. |
Moreover, if I was able to partially understand the code, if no 16-bit chars are allowed with binarytext option I think there is a problem with € symbol in any case. Is it right? |
The issue is that you are not passing in a iso-8859-15 encoded string. The euro symbol is being passed in as unicode U+20AC. You need to convert it to |
Ok I understand the situation. We investigate a little bit and it seems that both the libraries that we tried to convert to iso 8859-15 effectively convert the euro as uncode U+20AC mainwhile all the other symbols in the form \x'something'. I think there is all. Thanks a lot for your support and really really thanks for your time! |
Hi,
I'm working on a project where is mandatory to use as encoding iso-8859-15 to generate a pdf417 barcode.
I'm calling the bwipjs.toCanvas with the following options:
bcid: 'pdf417',
text: myText,
scaleX: 3,
scaleY: 2,
columns: 7,
eclevel: 4,
parsefnc: true
where "myText" is of this form: "^ECI000017" + valueString.
It seems that all the characters that contain a dieresis like ë are not encoding correcty
as example if I try to convert the following world Schaumbërg the result is Schaumbërg.
Moreover also other special chars like the euro symbol are not correctly rapresented. In this case the euro became €
The text was updated successfully, but these errors were encountered: