I have a problem. The word "lyža" has 4 characters. When I use the "strlen" command it gives 5 characters. I can handle this by using "iconv_strlen". But if I want to use the "preg_match" command. So he finds another position. The problem is illustrated by the following code. In both cases there are dashes at 4 positions. The accented character makes a problem.
$line = 'lyza------';
preg_match('/[-]+/', $line, $matches, PREG_OFFSET_CAPTURE);
print_r($matches);
$line2 = 'lyža------';
preg_match('/[-]+/', $line2, $matches2, PREG_OFFSET_CAPTURE);
print_r($matches2);