I have read around about this and now I'm considering to use this, but I have confusion in my mind about this context, and have some questions but i start for a simple problem to risolve that may implicit respond at my questions.
Well, suppose that i wonted display/print a set of unicode character.
I have choice to print on screen the characters from U+2500 to U+2600
- 1 - What is the best approach to do this?
- 2 - I know that using ALT+num i can display a char. But I have seen that if i use ALT+0NUM the behavior is different. Can anyone explain the difference?
- 2a - Can use this method for create unicode characters?
- 3 - Why the notation U+ ? What mean?
- 4 - I see that windows(I use seven 32bit) use the "character map" application for copy and paste. This means that clipboard is unicode aware?
- 5 - I use notepad for editing the batch script. I need to use attention/options in create this new unicode aware script?
- 6 - I know that the comand windows need use the font Lucida Console. It's right?
PS: My question is not clear because i dont' know well the unicode!
This is the code that i need to change:
Code: Select all
@echo off & setlocal EnableDelayedExpansion
Rem Use FONT raster 8x8 for better visualization
rem default color and chars
set Def_Color=0A
set Def_Fill_char=Û
set Def_Empty_Char=ú
Set /a Lines=80, Cols=120
Call :Init
For /L %%x in (1,1,10) do call :Plot_X_Y %%x+10 %%x+5
For /L %%x in (1,1,20) do call :Plot_X_Y 35-%%x %%x+8
For /L %%x in (-16,1,16) do For /L %%y in (-16,1,16) do (
set /a c=%%x*%%x+%%y*%%y-15*15
if !c! leq 0 call :Plot_X_Y %%x+50 %%y+25
)
call :Flush_Screen_Buff
goto :End
#############################################################################
:Plot_X_Y x y [Char]
set /a X=%1, Y=%2
if !random:~-1! leq 1 set /P "=Plot !X! !Y! !CR!" <nul
if !X! gtr 0 if !Y! gtr 0 if !X! leq !Cols! if !Y! leq !Lines! (
if "%3"=="" (set P_!X!_!Y!=%Def_Fill_char%) else set P_!X!_!Y!=%3
)
goto :eof
:Flush_Screen_Buff
Cls
set "Label_Y= Y ³³³³³³"
Echo((0,0^) X ÄÄÄÄÄÄ
For /L %%y in (1,1,%lines%) do (
if "!Label_Y:~%%y,1!"=="" (set/P"=%BS% " <nul) else set/P"=%BS%!Label_Y:~%%y,1!" <nul
For /L %%x in (1,1,%cols%) do set /P "=!P_%%x_%%y:~0,1!" <nul
echo(
)
Echo(
goto :eof
:Init
Echo For Better Visualization use FONT raster 8x8
Echo Please Wait... Init the system...
chcp 437
rem Define BS to contain a backspace
for /f %%a in ('"prompt $H&for %%b in (1) do rem"') do set "BS=%%a"
for /f %%a in ('copy /Z "%~dpf0" nul') do set "CR=%%a"
rem Buffer schermo
rem un pixel o 2 pixel (nel modo a doppia risoluzione) e' formato da un charattere C e dal
rem colore foreground fg F e background bg B.
Rem Utilizzo tante variabili con tre caratteri che rappresentano le tre informazioni
Rem P_X_Y=CBF
set /a TL=Lines+5, TC=Cols+2
For /L %%y in (1,1,%lines%) do For /L %%x in (1,1,%cols%) do set "P_%%x_%%y=%Def_Empty_Char%%Def_Color%"
mode %TC%,%TL%
Cls & Color %Def_Color%
Call :Flush_Screen_Buff
goto :eof
:End
endlocal
goto :eof
Einstein1969