mIRC Home    About    Download    Register    News    Help

Print Thread
#209022 03/02/09 12:51 PM
Joined: Feb 2003
Posts: 3,412
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,412
I installed vista 64 bits on my computer, then i notices the text got a strange behavior from connads like:

$wmiget(Win32_OperatingSystem).Caption

returns Microsoft® Windows Vista™ Ultimate.

and

$duration($calc($ctime - $ctime(%tmp.install)))

returns Installed for: 117wks 4days ago.

I don't know why it doing this, the 117wks shouldent be there, and aren't if i using windows xp 64 bits, and the font looks ok if i do $wmiget(Win32_OperatingSystem).Caption in windows xp 64, any way i can "force" mir in display the text as it should look like also in vista?

Microsoft Windows Vista Ultimate.

i don't know why it adding the strange text.

Microsoft® Windows Vista Ultimate.

someone else that noticed this?

Joined: Dec 2002
Posts: 3,015
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,015
The strange text is unicode text. It would display correctly if you enabled UTF-8 display.

Joined: Feb 2003
Posts: 3,412
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,412
Thnx, didn't know that, never used windows vista befor.. smile got the same behavior in windows 7 too.. =)

Joined: Nov 2006
Posts: 1,552
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,552
Only as a general remark, if you want to work with text you don't whether or not it's UTF, use something like:

; check for $isutf as $utfdecode will cause an error if the text contains non-utf $chr(128) - $chr(255)
var %t = -yourtext-
-do somwthing with- $iif($isutf(%t),$utfdecode(%t),%t)

Example of the different isutf-states:
Code:
var %x = a ä Ã $+ ¤, %n = 1
while ($gettok(%x,%n,32)) {
  var %t = $v1
  echo -a isutf: $isutf(%t) :: $iif(($isutf(%t) == 2),decoding %t to $utfdecode(%t),processing %t)
  inc %n
} 

Joined: Feb 2003
Posts: 3,412
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,412
Thnx.. smile


Link Copied to Clipboard