diff --git a/java/io/nayuki/qrcodegen/QrCodeGeneratorDemo.java b/java/io/nayuki/qrcodegen/QrCodeGeneratorDemo.java index 0b98db3..6b6e880 100644 --- a/java/io/nayuki/qrcodegen/QrCodeGeneratorDemo.java +++ b/java/io/nayuki/qrcodegen/QrCodeGeneratorDemo.java @@ -137,18 +137,7 @@ public final class QrCodeGeneratorDemo { qr = QrCode.encodeText(madoka, QrCode.Ecc.LOW); writePng(qr.toImage(9, 4), "madoka-utf8-QR.png"); - int[] kanjiChars = { // Kanji mode encoding (13 bits per character) - 0x0035, 0x1002, 0x0FC0, 0x0AED, 0x0AD7, - 0x015C, 0x0147, 0x0129, 0x0059, 0x01BD, - 0x018D, 0x018A, 0x0036, 0x0141, 0x0144, - 0x0001, 0x0000, 0x0249, 0x0240, 0x0249, - 0x0000, 0x0104, 0x0105, 0x0113, 0x0115, - 0x0000, 0x0208, 0x01FF, 0x0008, - }; - BitBuffer bb = new BitBuffer(); - for (int c : kanjiChars) - bb.appendBits(c, 13); - segs = Arrays.asList(new QrSegment(QrSegment.Mode.KANJI, kanjiChars.length, bb)); + segs = Arrays.asList(QrSegmentAdvanced.makeKanji(madoka)); qr = QrCode.encodeSegments(segs, QrCode.Ecc.LOW); writePng(qr.toImage(9, 4), "madoka-kanji-QR.png"); }