Page 1 of 1 1
Topic Options
#77397 - 2001-04-02 10:54 PM CHR(255) = CHR(159) bug still in KiX2001
cj Offline
MM club member
*****

Registered: 2000-04-06
Posts: 1102
Loc: Brisbane, Australia
I was hoping for too much

KiX2k cannot distinguish between 60 of the characters...

AsciiScan.KiX

code:

break on
$=setascii("on")
cls


;
; Ascii Comparison bug test
;
; This is the list of ascii characters that KiX cannot tell apart
; ie as far as KiX is concerned chr(154) = chr(138) ie U umlaut = e grave
;


; create a list of all chars from 1 to 255
$i=1 $s="" do $s=$s+chr($i) $i=$i+1 until $i=256


; scan chars and any that are not equal, but report as equal are displayed
; except for any below chr(122) "z" because KiX thinks "A" = "a"
"KiX says that:" ? ? $i=1 $j=0
do
if $i>122 and $i<>instr($s, chr($i)) "chr("$i") = chr(" instr($s, chr($i)) ") : '"
chr($i) "' = '" chr(instr($s, chr($i))) "'" $j=$j+1 if $j-$j/2=$j/2 ? else " " endif endif
$i=$i+1
until $i=256 ? "and cj says WTF?!" ? quit


cj

------------------
For more scripts goto my website and click the hammer and spanner icon.

chrismat@ozemail.com.au

Top
#77398 - 2001-04-20 06:20 PM Re: CHR(255) = CHR(159) bug still in KiX2001
Anonymous
Unregistered


I have to admit it, you had me puzzled here for a bit, but it turns out that this behaviour is actually in line with VBS, and has to do with the underlying codepage, in which a lot of 'extended' characters are mapped to 'regular' characters (such as 'S' for 138 and 's' for 154).

Below is a snippet of VBS that lists the same chars:

for i = 122 to 255
for j = 122 to 255
if i <> j and lcase(chr(i)) = lcase(chr(j)) then
wscript.echo Cstr(i) & " / " & Cstr(j) & " / " & chr(i)
end if
next
next

Kind regards,

Ruud

Top
#77399 - 2001-04-20 06:28 PM Re: CHR(255) = CHR(159) bug still in KiX2001
cj Offline
MM club member
*****

Registered: 2000-04-06
Posts: 1102
Loc: Brisbane, Australia
Can it be 'corrected' ?

cj

Top
#77400 - 2001-04-23 01:00 PM Re: CHR(255) = CHR(159) bug still in KiX2001
Anonymous
Unregistered


Well, beta 2 will have case-sensitive comparison, and that provides a way to distinguish between these characters (because they only differ in case).

Kind regards

Ruud

Top
#77401 - 2001-04-23 05:49 PM Re: CHR(255) = CHR(159) bug still in KiX2001
cj Offline
MM club member
*****

Registered: 2000-04-06
Posts: 1102
Loc: Brisbane, Australia
Excellent! Will we be able to turn case sensitivity off?


cj

Top
Page 1 of 1 1


Moderator:  ShaneEP, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 509 anonymous users online.
Newest Members
min_seow, Audio, Hoschi, Comet, rrosell
17881 Registered Users

Generated in 0.127 seconds in which 0.1 seconds were spent on a total of 12 queries. Zlib compression enabled.