UTF-8 mode $ZEXTRACT() works correctly when arguments are literals/constants

Final Release Note

$ZEXTRACT() works correctly in UTF-8 mode when all arguments are literals/constants. Previously, it performed an extract based on characters (i.e., like $EXTRACT()) instead of an extract based on bytes. The workaround was to store the literals/constants in variables and call the function with those variables as arguments. [#1093 (closed)]

Description

$zextract seems to return the whole argument string for string constant expression arguments, ignoring the limit arguments.

Example:

YDB>w $ZYRELEASE
YottaDB r2.00 Linux x86_64
YDB>w $zchset
UTF-8
YDB>w $zlength("ö") ; This letter consists of two bytes, as it should
2
YDB>s s="ö" w $zlength($zextract(s,1,1)) ; Return only the first byte, as it should
1
YDB>w $zlength($zextract("ö",1,1)) ; Bug? Should be same as above, but instead return 2 bytes
2

Draft Release Note

The $ZEXTRACT function works correctly in UTF-8 mode (i.e. when ydb_chset env var is UTF-8) when all parameters are literals/constants. Previously, it used to incorrectly operate like $EXTRACT, i.e. do a character level extract instead of a byte level extract. The workaround was to use variables containing those literals as function parameters.

Edited by K.S. Bhaskar