mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-27 04:42:35 +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");
|
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
|
//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++) {
|
// for (int i = 0; i < stringToEncode.length(); i++) {
|
||||||
let mut canEncode = false;
|
let mut canEncode = false;
|
||||||
for encoder in &neededEncoders {
|
for encoder in &neededEncoders {
|
||||||
|
|||||||
Reference in New Issue
Block a user