FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Extract Cyrillic sentences from Pelles C
Posts: 193
Joined: Wed Apr 04, 2007 06:54 AM
Extract Cyrillic sentences from Pelles C
Posted: Thu Jul 03, 2025 03:45 PM

Hi at all,

I have a dll created with pelles C with Cyrillic sentences in the "string tables" section.

I extract a sentence with LoadValue(30, "CHARACTER")

but I can't display it with MsgInfo() I only get a series of ????????

if I load the same sentence from a text file created with notepad in utf8, I can see the Cyrillic characters.

how should I convert what I get with LoadValue(30, "CHARACTER") to see it in Cyrillic?

I tried some conversion functions (like Utf16toUtf8) but without result.

thanks for the help.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Extract Cyrillic sentences from Pelles C
Posted: Fri Jul 04, 2025 04:57 AM

Dear Marzio,

Please try using STRTOWIDE( cString ) --> cWideString

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 193
Joined: Wed Apr 04, 2007 06:54 AM
Re: Extract Cyrillic sentences from Pelles C
Posted: Fri Jul 04, 2025 07:39 AM

thanks Antonio,

but StrToWide() doesn't resolve.

i obtain a single " ? "

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Extract Cyrillic sentences from Pelles C
Posted: Fri Jul 04, 2025 08:24 AM

Please try it using FW_UTF8TOSTR( cUtf8, [nCdp] )

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 193
Joined: Wed Apr 04, 2007 06:54 AM
Re: Extract Cyrillic sentences from Pelles C
Posted: Fri Jul 04, 2025 08:54 AM

Antonio,

still the same result: ?????????? ???

in the DLL created with Pelles C, what format are the characters in? UTF16?

because if the dll was already utf8 I should see it right as in the text created in notepad (utf8).

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Extract Cyrillic sentences from Pelles C
Posted: Fri Jul 04, 2025 09:48 AM

Please, another try with FW_UTF8TOOEM( cUtf8 )

Could you please email me the DLL ? thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Extract Cyrillic sentences from Pelles C
Posted: Fri Jul 04, 2025 03:39 PM
Dear Marzio,

Ok, we have to use LoadStringW()

We are preparing an example :wink:
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Extract Cyrillic sentences from Pelles C
Posted: Sun Jul 06, 2025 06:44 AM
Dear Marzio,

We have implemented new FWH functions:

* New: function LoadStringW() to load Unicode strings from resources string tables. Example of use:

#include "FiveWin.ch"

function Main()

MsgInfoW( LoadStringW( GetResources(), 30 ) ) // where 30 is the string ID
// MsgInfoW( LoadStringAuto( GetResources(), 30 ) ) // where 30 is the string ID

return nil

* New: function LoadStringAuto( hInstance, nId ) automatically detects if a string to be loaded is
Unicode and if so, it loads it as Unicode.

* New: functions FW_HasControlChars( cString ) --> lYesNo and FW_ContainsUnicodeChars( cString ) to
check if a string is Unicode. Used from new function LoadStringAuto().

We have emailed you an updated FWH 64 :!:
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 193
Joined: Wed Apr 04, 2007 06:54 AM
Re: Extract Cyrillic sentences from Pelles C
Posted: Sun Jul 06, 2025 07:37 AM
Thank you so much Antonio,

a perfect job as always.
you worked for us even on Saturdays and Sundays! :D

Continue the discussion