Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bug in VFP 6.0 on Pan-Chinese NT
Message
De
21/08/2001 14:26:49
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Bug in VFP 6.0 on Pan-Chinese NT
Divers
Thread ID:
00546905
Message ID:
00546905
Vues:
42
The following code illustrates a bug in VFP 6.0 on Pan-Chinese NT 4.0 and probably other MBCS NTs. The problem does not occur on U.S. NT. This bug affects Ed Rauh's CLSHEAP library.
* the following fails on pan-chinese win nt 4.0 sp 5
* VFP 6.0 sp 5 ver. 06.00.8961.00
lowbyte = 192
hibyte = 63
word = chr(lowbyte) + chr(hibyte)
? "l",asc(substr(word, 1, 1)) && 192 - correct
? "h",asc(substr(word, 2, 1)) && 63 - correct
? "w",asc(substr(word, 1, 1)) + asc(substr(word, 2, 1)) * 256 && 16320 - correct
? "fWORDToNum1", fWORDToNum1(word) && 65342 - wrong
? "fWORDToNum2", fWORDToNum2(word) && 65342 - wrong
wait

function fWORDToNum1
	*Take a binary WORD (16 bit USHORT) and convert it to a VFP Numeric
	lparameter tcWORD
	return asc(tcWORD) + bitlshift(asc(substr(tcWORD, 2, 1)), 8)
endfunc

function fWORDToNum2
	*Take a binary WORD (16 bit USHORT) and convert it to a VFP Numeric
	lparameter tcWORD
	return asc(tcWORD) + asc(substr(tcWORD, 2, 1)) * 256
endfunc
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform