Skip to content

Incorrect optimization #29

@OUDON

Description

@OUDON

Bug in the SegmentOptimizer.

Summary

A cost computed by SegmentOptimizer is too small in Byte Mode. This bug causes invalid segmentation.

Current Behaviour

>>> qr._optimized_segments("点茗")
[{'data': '点茗', 'encoder_class': <class 'rmqrcode.encoder.byte_encoder.ByteEncoder'>}

Expected Behaviour

>>> qr._optimized_segments("点茗")
[{'data': '点茗', 'encoder_class': <class 'rmqrcode.encoder.byte_encoder.KanjiEncoder'>}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions