diff --git a/test/ascii-art.nas b/test/ascii-art.nas index 05fb7b9..63417fb 100644 --- a/test/ascii-art.nas +++ b/test/ascii-art.nas @@ -139,6 +139,8 @@ var curve7=func(){ p=p>=4?0:p; } } + +# enable unicode if(os.platform()=="windows") system("chcp 65001"); trans_ttf("just for test"); diff --git a/test/bfs.nas b/test/bfs.nas index 407b33b..f0dc14f 100644 --- a/test/bfs.nas +++ b/test/bfs.nas @@ -53,7 +53,8 @@ var bfs=func(begin,end){ return; } +# enable ANSI escape sequence if(os.platform()=="windows") - system("chcp 65001"); + system("color"); print("\ec"); bfs([0,0],[9,19]); \ No newline at end of file diff --git a/test/filesystem.nas b/test/filesystem.nas index a8ab44f..87b6347 100644 --- a/test/filesystem.nas +++ b/test/filesystem.nas @@ -30,6 +30,7 @@ var prt=func(s,path){ } } +# enable unicode if(os.platform()=="windows") system("chcp 65001"); println("\e[33m[",unix.getcwd(),"]\e[36m>\e[0m"); diff --git a/test/life.nas b/test/life.nas index 78ed0d4..cb2e1e9 100644 --- a/test/life.nas +++ b/test/life.nas @@ -29,8 +29,9 @@ var prt=func() } func(){ + # enable ANSI escape sequence if(os.platform()=="windows") - system("chcp 65001"); + system("color"); print("\ec"); rand(time(0)); map=new_map(); diff --git a/test/qrcode.nas b/test/qrcode.nas index 10530b9..6db4747 100644 --- a/test/qrcode.nas +++ b/test/qrcode.nas @@ -22,6 +22,7 @@ var code=[ [1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0], ]; +# enable unicode if(os.platform()=="windows") system("chcp 65001"); var texture=[" ","██"]; diff --git a/test/snake.nas b/test/snake.nas index 00387fa..2311f7f 100644 --- a/test/snake.nas +++ b/test/snake.nas @@ -183,6 +183,7 @@ var co=coroutine.create(func(){ }); var main=func(){ + # enable unicode if(os.platform()=="windows") system("chcp 65001"); print("\ec"); diff --git a/test/wavecollapse.nas b/test/wavecollapse.nas index 28fc14c..d667919 100644 --- a/test/wavecollapse.nas +++ b/test/wavecollapse.nas @@ -94,6 +94,7 @@ var map=func(){ } }(); +# enable unicode if(os.platform()=="windows") system("chcp 65001"); map.new(80);