mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 12:22:34 +00:00
fixed various bugs with encoding qrcodes
This commit is contained in:
@@ -1052,7 +1052,14 @@ impl RXingResultNode {
|
||||
.encode_string(
|
||||
// &self.stringToEncode[self.fromPosition as usize
|
||||
// ..(self.fromPosition + self.characterLength as usize)],
|
||||
self.stringToEncode.get(self.fromPosition).unwrap(),
|
||||
// self.stringToEncode.get(self.fromPosition).unwrap(),
|
||||
&(self
|
||||
.stringToEncode
|
||||
.iter()
|
||||
.skip(self.fromPosition)
|
||||
.take(self.characterLength as usize)
|
||||
.map(|s| s.as_str())
|
||||
.collect::<String>()),
|
||||
self.charsetEncoderIndex,
|
||||
)
|
||||
.len() as u32
|
||||
@@ -1080,7 +1087,13 @@ impl RXingResultNode {
|
||||
encoder::appendBytes(
|
||||
// &self.stringToEncode[self.fromPosition as usize
|
||||
// ..(self.fromPosition + self.characterLength as usize)],
|
||||
self.stringToEncode.get(self.fromPosition).unwrap(),
|
||||
&(self
|
||||
.stringToEncode
|
||||
.iter()
|
||||
.skip(self.fromPosition)
|
||||
.take(self.characterLength as usize)
|
||||
.map(|s| s.as_str())
|
||||
.collect::<String>()), //self.stringToEncode.get(self.fromPosition).unwrap(),
|
||||
self.mode,
|
||||
bits,
|
||||
self.encoders.getCharset(self.charsetEncoderIndex),
|
||||
|
||||
Reference in New Issue
Block a user