Конференция "KOL" » too much russian comments [Delphi, Windows]
 
  • dotnet20 (25.01.14 07:38) [0]
    too much russian comments in kol&mck source, will raise exception during delphi compiling, i think use english much better.

    SmartOem2CharRus() is special, i think it maybe remove from kol.pas. it can't be compiled in other language windows platform except russia.
  • dotnet20 (25.01.14 07:41) [1]
    kol is a common liberary for all of world, it's better not include any special region code or comments.
  • Thaddy © (27.01.14 17:04) [2]
    Can you give me a line where it fails? We are doing this more than 10 years and it should not be a problem.
  • Juggernaut (27.01.14 22:18) [3]
    > use english much better

    Нет.

    > remove from kol.pas

    Нет.

    > for all of world

    От жеж загнул, иноземец. Ну напиши разработчикам чтоб расширили SmartOem2Char* на все языки)) Удачи)))
  • dotnet20 (28.01.14 07:06) [4]
    function WndProc_LVSubitemDraw()
    begin
    ...
    Rslt := CDRF_DODEFAULT // rusian comment
    ...
    Rslt := CDRF_NEWFONT; // rusian comment
    ...
    end;

    function smartOem2ansiRus(const s: AnsiString): AnsiString;
          function good(const x, y: AnsiString): Boolean;
          begin
              ...
               if  x[i] in ['?..'', '?..'? {, '?, '?}] then  // delphi xe2 can't compile
                   continue;
             ...
          end
    begin
    end;
  • dotnet20 (28.01.14 11:03) [5]
    function smartOem2ansiRus sugggest move to a special unit like 'KOL_RUS.pas'
  • Juggernaut (28.01.14 14:39) [6]
    Тогда уж типа kol_i18n.pas
  • Thaddy © (31.01.14 23:25) [7]
    We can also compromise and write everything in Dutch ;)
    Kol is written by a Russian. Lot's more people know Russian than Dutch.....

    And most comments are both in Russian and in English. Why not Dutch? That's the same as Russian for most English speakers anyway ;)

    We have a saying in the Netherlands:
    "It's all Chinese to me..."
  • dotnet20 (24.02.14 07:37) [8]
    a fixed version to support other language
    -----------------------------------------
    function smartOem2ansiRus(const s: AnsiString): AnsiString;
       function good(const x, y: AnsiString): Boolean;
       var i: Integer;
       begin
           Result := FALSE;
           if  Length(x) <> Length(y) then Exit;
           for i := 1 to Length(x) do
           begin
               if  x[i] = y[i] then continue;
               if  x[i] in [ #$E0..#$FF, #$C0..#$DF {, #$B8, #$A8}] then
                   continue;
               Exit;
           end;
           Result := TRUE;
       end;
    begin
       Result := oem2char(s);
       if  good(Result, s) then Exit;
       Result := ansi2oem(s);
       if  good(Result, s) then Exit;
       Result := s;
    end;
  • dotnet20 (24.02.14 07:37) [9]
    a fixed version to support other language
    -----------------------------------------
    function smartOem2ansiRus(const s: AnsiString): AnsiString;
       function good(const x, y: AnsiString): Boolean;
       var i: Integer;
       begin
           Result := FALSE;
           if  Length(x) <> Length(y) then Exit;
           for i := 1 to Length(x) do
           begin
               if  x[i] = y[i] then continue;
               if  x[i] in [ #$E0..#$FF, #$C0..#$DF {, #$B8, #$A8}] then
                   continue;
               Exit;
           end;
           Result := TRUE;
       end;
    begin
       Result := oem2char(s);
       if  good(Result, s) then Exit;
       Result := ansi2oem(s);
       if  good(Result, s) then Exit;
       Result := s;
    end;
  • Thaddy © (01.04.14 19:31) [10]
    Well, frankly, that won't do... In some cases.
    But if you use a recent version of Freepascal this can be done by providing the code page and the translations are done automagically. The issue is more complex than that. Also, note that KOL itself already has some Koi/Ansi/Ascii routines somewhere.
 
Конференция "KOL" » too much russian comments [Delphi, Windows]
Есть новые Нет новых   [118668   +49][b:0][p:0]