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

Incompatible character encodings: ASCII-8BIT and UTF-8 #6

Open
bverem opened this issue Jul 24, 2018 · 3 comments
Open

Incompatible character encodings: ASCII-8BIT and UTF-8 #6

bverem opened this issue Jul 24, 2018 · 3 comments

Comments

@bverem
Copy link

bverem commented Jul 24, 2018

When loading a QR-containing PNG with text (which can be read by any webcam QR reader), I get an "incompatible character encodings: ASCII-8BIT and UTF-8" error when trying to get the text through qr = Qrio::Qr.load("something.png").qr.text. I can't quite tell what the issue is. How might I address this issue? Thanks!

Encoding::CompatibilityError: incompatible character encodings: ASCII-8BIT and UTF-8
	from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/qrio-0.0.1/lib/qrio/qr_matrix.rb:212:in `join'
	from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/qrio-0.0.1/lib/qrio/qr_matrix.rb:212:in `text'

EDIT: It appears that Qrio has issues decoding strings containing a space near other symbols (such as colons and commas) and a space next to each other. I believe that it's a Qrio issue because other QR readers have no issues with this string. Advice would be sincerely appreciated!

EDIT 2: Also, hyphens (even without spaces).

@bverem
Copy link
Author

bverem commented Aug 7, 2018

It seems that this gem is no longer supported, and further testing seems to indicate that, for the most part, the gem doesn't reliably convert even simple QR codes (i.e., those consisting of a single number). I may fork it sometime in the next few months once my current project is completed. If anybody managed to address these issues, I'd be happy to hear your solutions!

@hasandiwan
Copy link

How's the fork coming along, @bverem ?

I'm running into this same error with the qr code for https://i.ibb.co/XCfRYYd/image.png because the text contains an emoji.

@bverem
Copy link
Author

bverem commented Jun 30, 2022

Apologies--I started using zbar instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants