Interactive PowerBasic Forum

IT-Consultant: Charles Pegge => OxygenBasic Examples => Topic started by: Frank BrĂ¼bach on November 22, 2024, 02:36:09 PM

Title: Wstring question
Post by: Frank BrĂ¼bach on November 22, 2024, 02:36:09 PM
hello all..

how I can correct display chinese characters in mbox ?
print message doesn't work here correct
Songtext Works fine.

' how I can correct display chinese characters in mbox ?
' print message doesn't work here correct

' uses corewin

' 1) -------------------- //     
wstring tab=wchr(9)
   
wstring s + tab : getfile "chinHello.txt",s  ' chinese characters
wstring p + tab : getfile "turnturnturn.txt",p ' song

mbox s ' print s doesn't work correct, result get displayed not ok
mbox p ' result get displayed ok

' 2) -------------------- //

wstring stu,sw
getfile "turnturnturn.txt",stu

putfile "song1.txt",stu ' songtext ok

mbox stu

' 3) -------------------- //

getfile "chinHello.txt",sw
putfile "chinaResult.txt",sw ' result in textfile ok with chinese characters

mbox sw ' result get displayed not ok

print "ok"
Title: Re: Wstring question
Post by: Charles Pegge on November 22, 2024, 03:04:08 PM
uses corewin
wstring s
getfile "chinhello.txt",s
MessageboxW 0,s,L"Chinese",0 'ok
print s 'ok
'but mbox expects an ANSI strptr and does not type-check