Play nice with different encodings
This commit is contained in:
parent
9b13eacdf1
commit
43a2c5694e
@ -1298,8 +1298,14 @@ private:
|
|||||||
cont = handler.RawNumber(str, SizeType(length), false);
|
cont = handler.RawNumber(str, SizeType(length), false);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const char* str = s.Pop();
|
StackStream<typename TargetEncoding::Ch> stackStream(stack_);
|
||||||
SizeType length = static_cast<SizeType>(s.Length()) - 1;
|
SizeType numCharsToCopy = s.Length();
|
||||||
|
while (numCharsToCopy--) {
|
||||||
|
Transcoder<SourceEncoding, TargetEncoding>::Transcode(is, stackStream);
|
||||||
|
}
|
||||||
|
stackStream.Put('\0');
|
||||||
|
const typename TargetEncoding::Ch* str = stackStream.Pop();
|
||||||
|
const SizeType length = static_cast<SizeType>(stackStream.Length()) - 1;
|
||||||
cont = handler.RawNumber(str, SizeType(length), true);
|
cont = handler.RawNumber(str, SizeType(length), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user