Recent

Author Topic: GLScene OPM version installation failed  (Read 699 times)

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2257
  • Fifty shades of code.
    • Delphi & FreePascal
GLScene OPM version installation failed
« on: February 08, 2024, 05:16:28 pm »
Good day!

I am unsure if its the right forum channel to post such, if I was wrong, please move to a matching one, thank you.

Lazarus 3.99 (rev main_3_99-1385-g180dcc8888) FPC 3.2.2 x86_64-win64-win32/win64

I did try today to install the OPM package but installation stop at
Code: Pascal  [Select][+][-]
  1. Result := KOI8ToUTF8(aValue);
(Line 248 within GLSLanguage.pas)
As a quick and dirty fix I did comment out the affected missing code.
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

Thaddy

  • Hero Member
  • *****
  • Posts: 14625
  • Sensorship about opinions does not belong here.
Re: GLScene OPM version installation failed
« Reply #1 on: February 08, 2024, 05:29:27 pm »
KoI8ToUtf8 would be merely a translation from Cyrillic Ansi like, to UTF8. I was not aware that was in the RTL, but I have one if you need it, It is equivalent to Ansi To Utf8. I wonder if UTF8String cast just works. What I have is from the KOL library but does not contain any KOL related specifics.
« Last Edit: February 08, 2024, 06:02:36 pm by Thaddy »
bitrate is always calculated like this:sample rate * bitdepth * number of channels.

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2257
  • Fifty shades of code.
    • Delphi & FreePascal
Re: GLScene OPM version installation failed
« Reply #2 on: February 08, 2024, 05:47:48 pm »
I personal do not need, thanks Thaddy, I just wanted to let OPM users know that this package will not install without modify its source as long the used method does not exist.
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

Thaddy

  • Hero Member
  • *****
  • Posts: 14625
  • Sensorship about opinions does not belong here.
Re: GLScene OPM version installation failed
« Reply #3 on: February 08, 2024, 06:20:35 pm »
We have a lot of Cyrillic languages users, so even if you do not use it, it would be a welcome addition to the RTL, since KoI8 is widely used.
That was the point I was trying to make with my previous remark.
bitrate is always calculated like this:sample rate * bitdepth * number of channels.

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2257
  • Fifty shades of code.
    • Delphi & FreePascal
Re: GLScene OPM version installation failed
« Reply #4 on: February 08, 2024, 06:36:21 pm »
Code: Pascal  [Select][+][-]
  1. function TGLLanguage.EncodeToUTF8(aValue: AnsiString): UTF8String;
  2. begin
  3. {$IFDEF FPC}
  4.   case ConvertEncodingList of
  5.     celAutomatic:
  6.       Result := ConvertEncoding(aValue, GuessEncoding(aValue), EncodingUTF8);
  7.     celISO_8859_1ToUTF8:
  8.       Result := ISO_8859_1ToUTF8(aValue);
  9.     celISO_8859_2ToUTF8:
  10.       Result := ISO_8859_2ToUTF8(aValue);
  11.     celCP1250ToUTF8:
  12.       Result := CP1250ToUTF8(aValue);
  13.     celCP1251ToUTF8:
  14.       Result := CP1251ToUTF8(aValue);
  15.     celCP1252ToUTF8:
  16.       Result := CP1252ToUTF8(aValue);
  17.     celCP1253ToUTF8:
  18.       Result := CP1253ToUTF8(aValue);
  19.     celCP1254ToUTF8:
  20.       Result := CP1254ToUTF8(aValue);
  21.     celCP1255ToUTF8:
  22.       Result := CP1255ToUTF8(aValue);
  23.     celCP1256ToUTF8:
  24.       Result := CP1256ToUTF8(aValue);
  25.     celCP1257ToUTF8:
  26.       Result := CP1257ToUTF8(aValue);
  27.     celCP1258ToUTF8:
  28.       Result := CP1258ToUTF8(aValue);
  29.     celCP437ToUTF8:
  30.       Result := CP437ToUTF8(aValue);
  31.     celCP850ToUTF8:
  32.       Result := CP850ToUTF8(aValue);
  33.     celCP866ToUTF8:
  34.       Result := CP866ToUTF8(aValue);
  35.     celCP874ToUTF8:
  36.       Result := CP874ToUTF8(aValue);
  37.     celKOI8ToUTF8:
  38.       Result := KOI8ToUTF8(aValue); // this is the faulty line
  39.     celUCS2LEToUTF8:
  40.       Result := UCS2LEToUTF8(aValue);
  41.     celUCS2BEToUTF8:
  42.       Result := UCS2BEToUTF8(aValue);
  43.   end;
  44. {$ELSE}
  45.   Result := aValue;
  46. {$ENDIF}
  47. end;
Now I did check what the LConvEncoding unit offers and I did found
Code: Pascal  [Select][+][-]
  1. function KOI8RToUTF8(const s: string): string;  // russian cyrillic
so finally I just added the R to have it supported, in hope it is the same that the author of GLScene had in mind at creation.
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

wp

  • Hero Member
  • *****
  • Posts: 12027
Re: GLScene OPM version installation failed
« Reply #5 on: February 09, 2024, 05:40:30 pm »
In Laz 2.2.0 this is a "deprecated" note in unit LConvEncoding:

Code: Pascal  [Select][+][-]
  1. function KOI8ToUTF8(const s: string): string; deprecated 'Call KOI8RToUTF8 instead.';

Fate of unmaintained packages...
« Last Edit: February 09, 2024, 05:56:30 pm by wp »

 

TinyPortal © 2005-2018