[Lazarus] startlazarus splash

Andrea Mauri andrea.mauri.75 at gmail.com
Thu Sep 17 10:44:07 CEST 2009


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)

Changing the encoding should fix the problem, but you might have a
side effect on other (non Windows) systems.

thanks,
dmitry




More information about the Lazarus mailing list