![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-02 03:35 |
48,037 topics / 350,122 posts / today 2 new / 48,250 members |
| DOS批处理 & 脚本技术(批处理室) » How to input ASCII code but output character? |
| Printable Version 1,582 / 6 |
| Floor1 zlt004 | Posted 2006-09-14 01:10 |
| 初级用户 Posts 10 Credits 36 | |
|
How to input ASCII code but output the character?
|
|
| Floor2 zlt004 | Posted 2006-09-14 01:47 |
| 初级用户 Posts 10 Credits 36 | |
| Floor3 namejm | Posted 2006-09-14 01:51 |
| 荣誉版主 Posts 1,737 Credits 5,226 From 成都 | |
|
Please check whether the question in the top post is clearly described before continuing to ask questions.
|
|
| Floor4 zlt004 | Posted 2006-09-14 07:30 |
| 初级用户 Posts 10 Credits 36 | |
|
It means converting a character to ASCII, and then using CMD to convert it back to the character for output. For example, the ASCII of 'a' is 110001. Then you would input 110001 in CMD, but the output would be 'a'.
I wonder if it's clear enough. |
|
| Floor5 zh159 | Posted 2006-09-14 11:42 |
| 金牌会员 Posts 1,467 Credits 3,687 | |
|
Mini Converter for Hexadecimal Character Text/Binary File
Can only convert to file [ Last edited by zxcv on 2006-9-14 at 11:43 ] |
|
| Floor6 namejm | Posted 2006-09-14 12:26 |
| 荣誉版主 Posts 1,737 Credits 5,226 From 成都 | |
|
I have seen batch scripts for converting between decimal and hexadecimal before. The basic principle is to convert the characters 0-9 in decimal to the corresponding hexadecimal characters. In fact, as long as there is a conversion table, this problem is relatively easy to solve. Unfortunately, I don't know what that conversion table looks like.
|
|
| Floor7 zh159 | Posted 2006-09-14 13:29 |
| 金牌会员 Posts 1,467 Credits 3,687 | |
|
Converting hexadecimal to decimal is very simple: "set /a N=0xFFFF"
Converting between binary, octal, decimal, and hexadecimal is more convenient with batch commands, while conversion tables are quite limited PS: I found an ASCII to Unicode conversion table online yesterday, which is 145k and has 7445 pairs. After making "set ASCII=UniCode", it took 10 seconds to load; I made a batch file last night and it took 3 hours to convert it to an ASCII to UTF-8 conversion table, which is also over 100k To display as text, you still need to use the "Mini Converter for Hexadecimal Character Text/Binary File (ASCII)" [ Last edited by zxcv on 2006-9-14 at 01:34 ] |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |