From dd18a3b11b28c3ed8126a6f54b829989954bfa03 Mon Sep 17 00:00:00 2001 From: Adriano dos Santos Fernandes Date: Wed, 11 May 2022 15:00:49 -0300 Subject: [PATCH] Fix #7179 - Wrong error message - "string right truncation. expected length 30, actual 30" --- src/jrd/intl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/jrd/intl.cpp b/src/jrd/intl.cpp index f03f3773e6..35317c403d 100644 --- a/src/jrd/intl.cpp +++ b/src/jrd/intl.cpp @@ -929,7 +929,8 @@ int INTL_convert_string(dsc* to, const dsc* from, Firebird::Callbacks* cb) break; } - const ULONG src_len = toCharSet->length(toLength, start, false); + CharSet* const fromCharSet = INTL_charset_lookup(tdbb, from_cs); + const ULONG src_len = fromCharSet->length(from_len, from_ptr, false); const ULONG dest_len = (ULONG) to_size / toCharSet->maxBytesPerChar(); if (toCharSet->isMultiByte() && src_len > dest_len)