Hello! I'm trying to make datamatrix code for Cyrillic
text := "Mосква"
datamatrixWriter := datamatrix.NewDataMatrixWriter()
datamatrixCode, _ := datamatrixWriter.Encode(text, gozxing.BarcodeFormat_DATA_MATRIX, 648, 648, nil)
and Windows1251 ("Ìîñêâà"):
text := "Mосква"
enc := charmap.Windows1251.NewEncoder()
win1251text, _ := enc.String(text)
datamatrixWriter := datamatrix.NewDataMatrixWriter()
datamatrixCode, _ := datamatrixWriter.Encode(win1251text, gozxing.BarcodeFormat_DATA_MATRIX, 648, 648, nil)
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x12f2e63]
github.com/makiuchi-d/gozxing/datamatrix/encoder.(*EncoderContext).SetSymbolShape(...)
/go/src/github.com/makiuchi-d/gozxing/datamatrix/encoder/encoder_context.go:42
github.com/makiuchi-d/gozxing/datamatrix/encoder.EncodeHighLevel(0x13ed327, 0x4, 0x0, 0x0, 0x0, 0xc0001024b0, 0x34, 0xc000000076, 0xc0000b4078, 0x10c2240)
/go/src/github.com/makiuchi-d/gozxing/datamatrix/encoder/high_level_encoder.go:116 +0x1a3
github.com/makiuchi-d/gozxing/datamatrix.(*DataMatrixWriter).Encode(0x172ad30, 0x13ed327, 0x4, 0x5, 0x288, 0x288, 0x0, 0x0, 0x0, 0x140695a)
/go/src/github.com/makiuchi-d/gozxing/datamatrix/datamatrix_writer.go:61 +0x2ac
main.createRPImageContext(0x13ef3bd, 0x9, 0x0, 0x829749600, 0x0, 0x140695a, 0x60, 0x140695a, 0x60, 0x140695a, ...)