English
Forum

Russischer Zeichensatz

 

Stephan
Sonneborn
Hello together,

in the Help back the function SET("CHARSET", X), that for x now too values >2 permitted are. whom worth should one because for a russian Zeichensatz take on? I habs with $0419 probiert. has but not so hingehauen...

really would like I the following trouble solve:
Texts, The in russian exist, with Profan z.B. as Buttontexte or Statictexte spend.
means z.B. "Отмена" for "Abbrechen" on a Schaltfläche lay...
 
Schöne Grüße aus Wittgenstein
von Stephan

Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz
05/22/12  
 



I am not sure but I faith that the only with Unicode or. WideChar-
Controls goes.

Perhaps help you these Topics:

produce: [...] 
Polish: [...] 
widechartomultibyte: [...] 
multibytetowidechar: [...] 
Erklär: [...] 
Function-Set: [...] 

If it you mere around the present goes then is it well the Simplest if
You one HTML-Control uses.
 
05/22/12  
 




Stephan
Sonneborn
Hello iF,

there have You already right, the goes only with Unicode. but How very???

I Have me your example respected.
The russian characters begin with u+0400 and weg To u+04ff = 256 characters.

I thought, with SET ("CHARSET",~lang_russian) would one a offset settle and then could one The characters simply with zB. CHR$($0400) take. goes but not, there CHR$() only values between 0...255 knows.

it should The function CHRW$() or. ORDW() since.

white someone, How one The prepares?

In VB is apparently The CHRW()-function of House from thereby.

one could itself Yes present, The STATICS and EDITS to your default to create (over CreateW() or. CreateWindowExW()), then any recent Standardtexte transfiguring in WideChars and then with a SetTextW The Texts into Controls present...

but How???
 
Schöne Grüße aus Wittgenstein
von Stephan

Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz
05/29/12  
 



Hello Stephan,

Nico what about me having soeben the following erarbeitet,

Please Try time in how far the so works:
CompileMarkSeparation
 {$cleq}
 {$compiler c:\xprofan12}
 {$runtime c:\xprofan12}
CLS
Struct CREATESTRUCT = lpCreateParams&, hInstance&, hMenu&, hwndParent&, cy%, cx%, y%, x%, style&, lpszName&, lpszClass&, dwExStyle&
var id% = 1
Var static&=CreateW("STATIC","Das ist ein Static. \nHier sollen Unicode-Zeichen rein.",$50000000,10,10,width(%hwnd)-20,35,%hwnd,0,%hinstance)
Waitinput
SetWindowTextW(static&,utf("Test ")+chrw(400)+utf(" Test"))
Waitinput
End

proc chrw

    parameters wc&
    declare m#
    dim m#,2
    word m#,0=wc&
    var s$=char$(m#,0,2)
    dispose m#
    return s$

endproc

Proc UTF

    parameters text$
    declare b#
    Dim b#,2*len(text$)+2
    StringW b#,0 = text$
    text$ = Char$(b#,0,SizeOf(b#)-2)
    return text$

EndProc

Proc CreateW

    parameters Class$,Name$,style&,x%,y%,dx%,dy%,pWnd&,pid%,hInst&,exstyle&
    case %pCount <11 : exstyle& = 0
    Class$ = UTF(Class$)
    Name$ = UTF(Name$)
    Var cs# = New(CREATESTRUCT)

    With cs#

        .lpCreateParams& = SizeOf(cs#)
        .hInstance& = hInst&
        .hMenu& = (IsMenu(id%)<>0) * id%
        .hwndParent& = pWnd&
        .cy% = dy%
        .cx% = dx%
        .y% = y%
        .x% = x%
        .style& = style&
        .lpszName& = Addr(Name$)
        .lpszClass& = Addr(Class$)
        .dwExStyle& = exstyle&

    EndWith

    Var handle& = CreateWindowExW(exstyle&,Addr(Class$),Addr(Name$),style&,x%,y%,dx%,dy%,pWnd&,id%,hInst&,cs#)
    Class$ = WinError$(%WinError)
    inc id%

    IfNot handle&

        MessageBox("Es trat folgender Fehler auf:\n\n" + Class$,"F E H L E R !!!",4096)

    EndIf

    Dispose cs#
    Return handle&

=s4 href='./../../Function-References/XProfan/endproc/'>ENDPROC

 
05/29/12  
 




Stephan
Sonneborn
Hello iF, Hello Nico,

thanks for Your Support. unfortunately shows me the code garnichts on...
CompileMarkSeparation
'URL: https://xprofan.com/intl/de/forum/russischer-zeichensatz/
'{$cleq}
'{$compiler c:\xprofan12}
'{$runtime c:\xprofan12}
DEF IsMEnu(1)           !"USER32", "IsMenu"
DEF CreateWindowExW(12) !"USER32", "CreateWindowExW"
DEF SetWindowTextW(2)   !"USER32", "SetWindowTextW"
CLS
Struct CREATESTRUCT = lpCreateParams&, hInstance&, hMenu&, hwndParent&, cy%, cx%, y%, x%, style&, lpszName&, lpszClass&, dwExStyle&
var id% = 1
Var static&=CreateW("STATIC","Das ist ein Static. \nHier sollen Unicode-Zeichen rein.",$50000000,10,10,width(%hwnd)-20,35,%hwnd,0,%hinstance)
Waitinput
SetWindowTextW(static&,utf("Test ") + chrw($401) + utf(" Test"))
Waitinput
End

proc chrw

    parameters wc&
    declare m#
    dim m#,2
    word m#,0=wc&
    var s$=char$(m#,0,2)
    dispose m#
    return s$

endproc

Proc UTF

    parameters text$
    declare b#
    Dim b#,2*len(text$)+2
    StringW b#,0 = text$
    text$ = Char$(b#,0,SizeOf(b#)-2)
    return text$

EndProc

Proc CreateW

    parameters Class$,Name$,style&,x%,y%,dx%,dy%,pWnd&,pid%,hInst&,exstyle&
    case %pCount <11 : exstyle& = 0
    Class$ = UTF(Class$)
    Name$ = UTF(Name$)
    Var cs# = New(CREATESTRUCT)

    With cs#

        .lpCreateParams& = SizeOf(cs#)
        .hInstance& = hInst&
        .hMenu& = (IsMenu(id%)<>0) * id%
        .hwndParent& = pWnd&
        .cy% = dy%
        .cx% = dx%
        .y% = y%
        .x% = x%
        .style& = style&
        .lpszName& = Addr(Name$)
        .lpszClass& = Addr(Class$)
        .dwExStyle& = exstyle&

    EndWith

    Var handle& = CreateWindowExW(exstyle&,Addr(Class$),Addr(Name$),style&,x%,y%,dx%,dy%,pWnd&,id%,hInst&,cs#)
    Class$ = WinError$(%WinError)
    inc id%

    IfNot handle&

        MessageBox("Es trat folgender Fehler auf:\n\n" + Class$,"F E H L E R !!!",4096)

    EndIf

    Dispose cs#
    Return handle&
lass=s4 href='./../../Function-References/XProfan/endproc/'>ENDPROC

not even the "Test" before it and behind it...
 
Schöne Grüße aus Wittgenstein
von Stephan

Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz
05/29/12  
 




Nico
Madysa
Oh, naturally shows it you nothing on. SetWindowTextW is a API-function and can with XProfan-Strings nothing anfangen; one must it The address on The Strings transfer:
Var static&=CreateW("STATIC","Das is a Static. \nHier should Unicode-characters mere.",$50000000,10,10,width(%hwnd)-20,35,%hwnd,0,%hinstance)
Waitinput
var a$ = utf("Test ") + chrw($401) + utf(" Test")
SetWindowTextW(static&,Addr(a$))

so geht's.
 
05/29/12  
 



high, I hahm on the Stephan whom Präkompi in use has ^^
 
05/30/12  
 




Stephan
Sonneborn
Nico Madysa (29.05.12)
so geht's.


Yes, so geht's. *sichandenkopfschlägt*
thanks Nico, for your Help!

but now The Ausbaustufe:
I have Texts (z.B. from Excel), The lying so to: "Отмена"
How do I get the now as Text in a Unicode-Control displayed?
one should But First once herausbekommen, which characters is the because now, what there displayed becomes. One ORD() supply naturally again only numbers between 0...255. Gibts to a entsprechendes OrdW()?
then could one Perhaps each String zeichenweise umsetzen into UniCode-stature and then as Genazes again Show.
(if in the Posting only ?????? showing: In my first Posting standing the russian concept)
 
Schöne Grüße aus Wittgenstein
von Stephan

Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz
05/30/12  
 



Ordw How posted:  [...] 
nproc ordw(string s){

    long m=dim(2)
    char m&,0=left$(s$+"\z\z",2)
    long wc=word(m,0)
    dispose(m)
    return wc

}


or.:
proc ordw

    parameters s$
    declare m#
    dim m#,2
    char m#,0=left$(s$+"\z\z",2)
    var wc&=word(m#,0)
    dispose m#
    return wc&

endproc


[OFFTOPIC]
Stephan Sonneborn (30.05.12)
(if in the Posting only ?????? showing: In my first Posting standing the russian concept)


apparently one bow of my Post Preview -

look I me with opportunity on. [/OFFTOPIC]
 
05/30/12  
 




Nico
Madysa
on this Page  [...]  find You so quite any Kodierungsumwandlungen, The your marrow to want can, as NProcs; too Widechar-mutants of Chr$() and Ord() are thereby.

I hope, it bereitet you no difficulty, tappt im dunkeln in a XPSE-free Syntax To translate.

but I see straight not, Why You OrdW need should.
the Widechar-Control, with the CreateW prepares been is, müsstest You only whom Text by SetWindowTextW allocate.
If the Text, whom You allocate want, already widecharkodiert is (means 2 Bytes per characters), then there thereby quite no obstacles.

Or others Worten: I see straight not, where your trouble lying.
 
05/30/12  
 




Stephan
Sonneborn
Nico Madysa (30.05.12)
Or others Worten: I see straight not, where your trouble lying.


my trouble lying hierin:
Füg time these both Lines in your Source one:
var b$ = "укепщьаь вввапа"
SetWindowTextW(static&,addr(b$))

by me then chinese (or whatever) characters displayed...

41 kB
Hochgeladen:05/31/12
Downloadcounter247
Download
 
Schöne Grüße aus Wittgenstein
von Stephan

Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz
05/31/12  
 



I have you here something "hingeschmiert" what whom Content of/ one with Widechar-Chars-
gefüllten Clipboard as CHR$(...-sequence into Clipboard ablegt.

so can You z.B.: укепщьаь

into Clipboard take and then the program Starting and then comes there:
chr $(67)+chr $(4)+chr $(58)+chr $(4)+chr $(53)+chr $(4)+chr $(63)+chr $(4)+chr $(73)+chr $(4)+chr $(76)+chr $(4)+chr $(48)+chr $(4)+chr $(76)+chr $(4)
with out.

the against as worth for b$ shows the desired.

Download
external Download

 {$cleq}
 {$compiler c:\XProfan12}
 {$runtime c:\XProfan12}
decimals 0
cls
casenot OpenClipboard(zero) : end
long mem=GetClipboardData(cf_unicodeText)
casenot mem : end
long c,b
string s

do{

    b=byte(mem,c)
    casenot b : casenot byte(mem,c+1) : break
    s=s+"chr$("+st$(b)+")+"
    c++

}

closeClipboard()
case s=="" : end
clearclip
putclip mid$(s,1,len(s)-1)
end


1.247 kB
Hochgeladen:05/31/12
Downloadcounter222
Download
7 kB
Hochgeladen:05/31/12
Downloadcounter235
Download
 
05/31/12  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

22.180 Views

Untitledvor 0 min.
Georg Teles08/29/24
Sven Bader03/22/22
Stephan Sonneborn03/21/22
Michael W.09/21/20
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie