To demonstrate this issue, execute (using cut and paste)
x="Частота"
in the octave CLI. The result is gibberish text for x, and incorrect values for the components of x as can be seen from
# The gibberish below comes from the cut and paste attempt
# of the above command
octave:3> x="��ст�т�"
x = ��ст�т�
octave:4> for i = 1:length(x)
> printf("%x\n", x(i));
> endfor
a7
b0
d1
81
d1
82
be
d1
82
b0
If you execute the x assignment in test_cyrillic.m, then you
get the correct result:
test_cyrillic
x
octave:5> test_cyrillic
octave:6> x
x = Частота
octave:7> for i = 1:length(x)
> printf("%x\n", x(i));
> endfor
d0
a7
d0
b0
d1
81
d1
82
d0
be
d1
82
d0
b0
which can be verified (subject to endianess swaps) using od on the bash command line as follows:
software@merlin> echo "Частота" od t x2
 a7d0 b0d0 81d1 82d1 bed0 82d1 b0d0 000a
0000017
Note, I tested "Частота" was valid UTF8 within the PLplot library (since that string is used within one of our examples)
and also by converting it using iconv, e.g.,
software@merlin> echo "Частота" iconv fromcode UTF8 tocode UTF8 od t x2
 a7d0 b0d0 81d1 82d1 bed0 82d1 b0d0 000a
0000017
I think there might be something specially wrong with cut and paste of Cyrillic for the octave CLI, because I have not encountered these issues with UTF8 strings for Mandarin, and UTF8 strings representing math symbols.
