Coder Social home page Coder Social logo

Russian Device Names about uos HOT 7 CLOSED

fredvs avatar fredvs commented on August 25, 2024
Russian Device Names

from uos.

Comments (7)

fredvs avatar fredvs commented on August 25, 2024

Hello.

Huh, it seems to be a utf-8 problem.
Do you have the same problem with audio-files (????.mp3 or ????.ogg) ?

I will check it asap.

Thanks to report it.

Fre;D

from uos.

fredvs avatar fredvs commented on August 25, 2024

Re-hello.

Could you try with last commit da316a2 ?

Thanks.

Fre;D

from uos.

akatser avatar akatser commented on August 25, 2024

Hi, both solutions : ( UTF8ToAnsi(devinf^._name); UTF8Decode(devinf^._name); ) Not work :(
I have the same problem with MMSystem:

procedure TForm1.FormCreate(Sender: TObject);
var
  WaveNums, i: integer;
  WaveInCaps: TWaveInCaps;
begin
  WaveNums := waveInGetNumDevs;
  if WaveNums > 0 then 
  begin
    for i := 0 to WaveNums - 1 do
    begin
      waveInGetDevCaps(i, @WaveInCaps, sizeof(TWaveInCaps));
      ComboBox1.Items.Add((PChar(@WaveInCaps.szPname)));
    //  ComboBox1.Items.Add(AnsiString(PChar(@WaveInCaps.szPname)));

    end;
  end;
  ComboBox1.ItemIndex:=0;
end; 

But this code works Fine in Delphi.

from uos.

akatser avatar akatser commented on August 25, 2024

I solved this problem by activating the -dDisableUTF8RTL and using SysToUTF8 function.

2

from uos.

fredvs avatar fredvs commented on August 25, 2024

Hello.

Ha, ok, I am very happy for you.

What code did you change in uos to make it working ?

This to add a comment for other people that uses Russian characters.

Thanks.

Fre;D

from uos.

akatser avatar akatser commented on August 25, 2024

http://wiki.freepascal.org/Lazarus_with_FPC3.0_without_UTF-8_mode , I disabled UTF-8 mode and used SysToUTF8 function in project.

Main_di.pas

uses .....LazUTF8;

stringgrid1.Cells[1, x] := SysToUTF8(uosDeviceInfos[x - 1].DeviceName); 

uos.pas

    uosDeviceInfos[x].HostAPIName := apiinf^._name;
    uosDeviceInfos[x].DeviceName := devinf^._name;

from uos.

fredvs avatar fredvs commented on August 25, 2024

@akatser 👍 many thanks.

I will add a comment for that.

Fre;D

from uos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.