- modify the script to examine the "numeric" characters
-
- declare
@i integer
- set
@i = 0
- while
@i < 256
- begin
if isnumeric(char(@i)) = 1
print N'Ascii code : ' + CAST ( @i as varchar) + ' isnumeric : ' + cast (isnumeric(char(@i)) as varchar) + ' Char : ' + char(@i)
set @i = @i + 1
- end
result
- Ascii code : 9 isnumeric : 1 Char :
- Ascii code : 10 isnumeric : 1 Char :
- Ascii code : 11 isnumeric : 1 Char :
- Ascii code : 12 isnumeric : 1 Char :
- Ascii code : 13 isnumeric : 1 Char :
- Ascii code : 36 isnumeric : 1 Char : $
- Ascii code : 43 isnumeric : 1 Char : +
- Ascii code : 44 isnumeric : 1 Char : ,
- Ascii code : 45 isnumeric : 1 Char : -
- Ascii code : 46 isnumeric : 1 Char : .
- Ascii code : 48 isnumeric : 1 Char : 0
- Ascii code : 49 isnumeric : 1 Char : 1
- Ascii code : 50 isnumeric : 1 Char : 2
- Ascii code : 51 isnumeric : 1 Char : 3
- Ascii code : 52 isnumeric : 1 Char : 4
- Ascii code : 53 isnumeric : 1 Char : 5
- Ascii code : 54 isnumeric : 1 Char : 6
- Ascii code : 55 isnumeric : 1 Char : 7
- Ascii code : 56 isnumeric : 1 Char : 8
- Ascii code : 57 isnumeric : 1 Char : 9
- Ascii code : 92 isnumeric : 1 Char : \
- Ascii code : 128 isnumeric : 1 Char : €
- Ascii code : 160 isnumeric : 1 Char :
- Ascii code : 162 isnumeric : 1 Char : ¢
- Ascii code : 163 isnumeric : 1 Char : £
- Ascii code : 164 isnumeric : 1 Char : ¤
- Ascii code : 165 isnumeric : 1 Char : ¥
For the most part the explanation is "valid" punctuation in a numeric "sting". Currency, signs and separators. Can't explain Horizontal Tab(9), Newline(10), Vertical Tab(11), Form Feed (12) and carriage Return (13) other than their presence at the beginning of a numeric "string" does allow the sting to evaluate as numeric.
select
isnumeric(char(13)+'123' )Characters above 127 will be different based on the codepage currently loaded.