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

Java version and UTF-8 German Umalauts #103

Open
mubbo opened this issue Dec 5, 2021 · 1 comment
Open

Java version and UTF-8 German Umalauts #103

mubbo opened this issue Dec 5, 2021 · 1 comment

Comments

@mubbo
Copy link

mubbo commented Dec 5, 2021

I've noticed with german Umalaut characters are not being correctly encoded in the Java version. They are being returned as "?". This is consistent with the javascript version when choosing multibyte SJIS and then using an umalute characters

üäöß

Is there someway I can set the multibyte encoding in the java version

Cheers and Thanks

Gary

@kazuhikoarase
Copy link
Owner

Hi,
I fixed a little. Now you can use UTF-8. 21a329f
Thank you.

    final QRCode qr = new QRCode();
    QRCode.set8BitByteEncoding("UTF-8");
    qr.setTypeNumber(4);
    qr.addData("üäöß", Mode.MODE_8BIT_BYTE);
    qr.make();
    final BufferedImage img = qr.createImage(2, 2);
    ImageIO.write(img, "png", new File( "myQR.png") );

myQR

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