Technical Article

ASCII table and UNICODE table

,

ASCII table and UNICODE table

You can easily change the font of "SQL Query Analyzer":
TOOLS/OPTIONS/FONTS

SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS OFF 
GO

CREATE PROCEDURE ASCIItable 
--usage:
--exec dbo.asciitable
AS
DECLARE @i int,@j int, @c VARCHAR(100)
SET @i=32
WHILE @i<=255
BEGIN
SET @j=0
SET @c=''
WHILE @j<=7
BEGIN
SET @c=@c+right('   '+CONVERT(VARCHAR(3),@i), 3)+' '+ CHAR(@i)+'    '
SET @j=@j+1
SET @i=@i+1
END
PRINT @c
END
GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO


SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS OFF 
GO

CREATE PROCEDURE UNItable  AS
--UNICODE table
declare @i int, @c nchar(1), @line nvarchar(4000)
SET @i=32
SET @line=''
WHILE @i<65536
BEGIN
SET @c=NCHAR(@i)
SET @line=@line+ RIGHT('    '+rtrim(convert(nchar(7),@i)),6)+' '+@c+'  '
if ((@i-31) % 12=0)or (@i=65535)
BEGIN
PRINT @line
SET @line=''
END
SET @i=@i+1
END
GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating