dmitry boyarintsev schreef:
Rigel, do you mean?

var
  ch : char;
begin
  ch := 'Q';
  case ch of
    'Q': writeln('Q');
    'Z': writeln('Z');
    'Я': writelh('Я');    // cyrillic character gives the error
  end;
end.

If your unit is new one (created by Lazarus, rather than Delphi), then
cyrillic characters are encoded as UTF8 character, that's 2 character
strings.

You can achieve the same effect as Delphi, by changing file's encoding
to the proper Ansi encoding:
Right Click on the editor -> File Settings -> Encoding -> select the
required encoding (current Windows Ansi encoding)
(for example cp1251 for Russian charset)


But this does not work if the ch is from a LCL component.

E.g
ch := Label.Caption[1];
Because the caption will be UTF8 encoded.

Vincent

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to