mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 04:12:34 +00:00
correctly count unicde characters
This commit is contained in:
@@ -2933,7 +2933,7 @@ impl ECIEncoderSet {
|
||||
let mut needUnicodeEncoder = priorityCharset.name().starts_with("UTF");
|
||||
|
||||
//Walk over the input string and see if all characters can be encoded with the list of encoders
|
||||
for i in 0..stringToEncode.len() {
|
||||
for i in 0..stringToEncode.chars().count() {
|
||||
// for (int i = 0; i < stringToEncode.length(); i++) {
|
||||
let mut canEncode = false;
|
||||
for encoder in &neededEncoders {
|
||||
|
||||
Reference in New Issue
Block a user