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

generate svg format panic #58

Open
devbins opened this issue Oct 29, 2022 · 0 comments
Open

generate svg format panic #58

devbins opened this issue Oct 29, 2022 · 0 comments

Comments

@devbins
Copy link

devbins commented Oct 29, 2022

use README generate svg qrcode example, it panic(qrcode crate version is 0.12)

the code is:

use qrcode::{QrCode, Version, EcLevel};
use qrcode::render::svg;

fn main() {
    let code = QrCode::with_version(b"01234567", Version::Micro(2), EcLevel::L).unwrap();
    let image = code.render()
        .min_dimensions(200, 200)
        .dark_color(svg::Color("#800000"))
        .light_color(svg::Color("#ffff80"))
        .build();
    println!("{}", image);
}

the result is:

panicked at 'called `Result::unwrap()` on an `Err` value: UnsupportedCharacterSet'
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

1 participant