|
Post by zakaria on Jan 2, 2019 0:38:22 GMT 1
Hello, vDos Team I appreciate your support, i have a program based on DOS i used to run it on Windows XP my program uses two languages when i use the program in small cmd screen the Arabic language shows up uncorrected Like This: And when i press alt+enter it shows up in fullscreen correctly and i can type in Arabic and everything works fine Like This: I wanted to change Windows XP to Windows Server to allow other computers enter my program using remote desktop. The problem is when i enter my PC using Remote Desktop i can not open the program with fullscreen, it opens only in small screen so i get uncorrected language. (Main language is Arabic) Then i found vDos which it helps alot i can run my DOS program using any version of windows but i get the same problem with Arabic language, even when i change Config.txt command to Windows=100 it opens my program in fullscreen but i get uncorrect language again and cannot type in Arabic. Like This: I hope you can help me as fast as possible.
|
|
|
Post by Jos on Jan 2, 2019 7:41:08 GMT 1
Arabic characters are not defined in the vDos internal font. You could add the line “FONT = C:\WINDOWS\FONTS\CONSOLA” to config.txt. But I’m afraid there will be more complications with Arabic.
Jos
|
|
|
Post by zakaria on Jan 2, 2019 10:00:54 GMT 1
Hello, Jos
I tried to use many fonts but i get the same problem, if you can help me to solve this problem, even if it is paid service i will be ready.
Thanks alot, waiting for your reply.
|
|
|
Post by Jos on Jan 2, 2019 10:46:21 GMT 1
When you enter CHCP at the command prompt of vDos, what codepage does it show? If that is incorrect, change it (720/864?), check for eventual "Characters not defined in TTF font: xx", and see if this displays as expected.
Jos
|
|
|
Post by zakaria on Jan 2, 2019 11:12:48 GMT 1
CHCP is 720 and i changed it to 864 i get the same issue, i also tried 65001.
|
|
|
Post by Jos on Jan 2, 2019 11:34:01 GMT 1
Does switching to another codepage report a number of undefined characters?
Jos
|
|
|
Post by zakaria on Jan 2, 2019 12:17:03 GMT 1
Yes, i tried to change CHCP several time.
|
|
|
Post by Jos on Jan 2, 2019 12:21:01 GMT 1
So a number of undefined characters are reported? Did you select (your) Consolas font, that should contain the missing characters.
Jos
|
|
|
Post by zakaria on Jan 2, 2019 12:34:59 GMT 1
Here is my config.txt file rem vDos has a few configuration options, you eventually set them in this file.
rem Don't try to include DOS config.sys or Windows config.nt settings like FILES= or KEYB=, that won't work!
rem <value>: A numeric value or string.
rem [value]: Parameter is optional.
REM Keyboard and mouse
REM ==================
rem Ctrl+V pastes text from the Windows Clipboard. If your program however needs Ctrl+V itself:
rem CTRL+V = OFF
rem In text mode the mouse is disabled.
rem Some programs just handle the mouse badly (being able to leave the window), to turn it on:
rem MOUSE = ON
REM Font
REM ====
rem Text is displayed by a built-in scalable TTF font, optimized for DOS programs.
rem To use another (monospaced) font, copy the font file (consola.ttf...) to the vDos folder, then:
rem FONT = Consola
rem Or more directly, for Windows installed fonts:
FONT = C:\WINDOWS\FONTS\CONSOLA
rem If no file extension is supplied, .TTF is assumed.
rem ASCII codes 176-223 mostly display a mix of lines/boxes and extended characters.
rem If characters are displayed while you expect lines/boxes, enforce these by the optional minus sign:
rem FONT = -[fontname]
REM Window
REM ======
rem The default vDos window is centered and will cover about (max) 75% of the screen.
rem This can be changed by WINDOW = [-][max percentage][,left-x-pos:top-y-pos]
rem In text mode, the window has some extra blank space to the left and right, the minus sign will disable this.
rem This would give you a full screen view. Mind, it's still a window (in disguise), so it won't obscure any Windows messages:
WINDOW = 100
rem Alternatively, you can use Alt+Enter to switch to and back from full screen while the program is running.
rem The number of lines and columns in text mode are the standard DOS 25x80.
rem See for yourself if changing this (minimal 24x80) is useful and supported by your program.
rem TEXT = 30x100
rem To use a different color scheme in text mode, supply all 16 color values in RGB: (r,g,b), or hexadecimal as in HTML: #RRGGBB.
rem The original DOS colors (first line is docu):
rem 0 - Black 1 - Blue 2 - Green 3 - Aqua 4 - Red 5 - Purple 6 - Yellow 7 - White 8 - Gray 9 - Lt Blue 10 - Lt Green 11 - Lt Aqua 12 - Lt Red 13- Lt Purple 14 - Lt Yellow 15 - Bright White
rem COLORS = (0,0,0) #0000aa #00aa00 #00aaaa (170,0,0) #aa00aa #aa5500 #aaaaaa #555555 #(85,85,255) #55ff55 #55ffff #ff5555 #ff55ff #ffff55 #ffffff
rem Scale the window when in graphics mode: SCALE = <1-9> (that’s 100-900%).
rem It won't be that nice, A single point is simply enlarged to 2x2 points:
rem SCALE = 2
REM WordPerfect/WordStar
REM ====================
rem The WP= directive is specific for use of WordPerfect or Wordstar.
rem Documentation can be found at: http://www.columbia.edu/~em36/wpdos/vdoswp.html or http://sfwriter.com/ws-vdos.htm.
REM Printing
REM ========
rem Without explicit settings, printing should mostly work just fine.
rem If it doesn't, or you want more control over the printer's output: See the Printing.pdf document. I am using Regular Consola font and when i try to use Consola Bold the program fonts gets affected but the same issue with Arabic Language. Do i have to change or add anything to the font? But the CMD used Consola also, when i tried to open the program with small screen it shows up incorrect language and when i open it in fullscreen it works fine. Is linking powershell with vDos going to solve the issue? Does switching to another codepage report a number of undefined characters? No, Everything is incorrect, i tried to use Arabic only font it changes the displayed fonts but everything is incorrect. Thank You Jos.
|
|
|
Post by Jos on Jan 2, 2019 13:35:27 GMT 1
Your program will load a bitmap font into the VGA card memory and use that instead of the regular VGA font. Sadly enough, the programmer chose an ASCII layout that doesn’t confirm to any of the codepages.
Essentially the bitmap font defines for instance ASCII 128 as an Arabic character, while that still is € in standard codepages, and that character is located at for instance ASCII 221. The bitmap font will only work with genuine VGA output (as in XP fullscreen), not with TTF fonts like a Windows DosBox, or vDos.
To remedy that, you would have to construct a codepage of your own (translating ASCII 128 to an Arabic character). You first have to know how that bitmap font defines its ASCII table. Look in the programs directory for some .FNT file, or some other file that would be that bitmap font. If it is embedded in the program, it will be hard to get the ASCII definitions.
Jos
|
|
|
Post by Jos on Jan 2, 2019 13:56:36 GMT 1
Correction: You need a table that defines what ASCII values translate to what Unicode characters. In your program enter 3 or so characters with Alt+<number>. Find the Unicode values at for instance en.wikipedia.org/wiki/Code_page_864. So you get: ASCII value = Unicode value for those 3 characters. Then copy for instance C_437.nls to C_764.nls. Change the 3 Unicode entries, install the codepage and test. If that works, do the other incorrect ASCII-Unicode combinations. Jos
|
|
|
Post by zakaria on Jan 3, 2019 11:27:01 GMT 1
Hello, Jos
I appreciate your support!, if you can support me via TeamViewer or AnyDesk, it will be great because i don't have enough experience to do the solution you mentioned.
|
|
|
Post by Jos on Jan 3, 2019 11:54:51 GMT 1
No TeamViewer/AnyDesk needed so far, I wouldn’t even be of much help with the following: Select 3 Arabic characters to test/check. Start your application (Windows XP) and find out the ASCII values of those by using Alt+<number> (Press and hold down Alt, enter a number between 1 to 255, release Alt). So you get 3 references: ASCII value (the number you entered) = one of the Arabic characters you selected. Then look for those 3 Arabic characters in the table at en.wikipedia.org/wiki/Code_page_864. First line in each row shows an image of the character, eventually you can click it to get a bigger picture. Second line the Unicode value (4 hexadecimal digits) we need. Third line the ASCII value (1-3 digits), that doesn’t match the ASCII value you found earlier on for that character (the reason why your program doesn’t display the Arabic characters correctly). Then submit those three ASCII – Unicode combinations. Jos
|
|
|
Post by zakaria on Jan 3, 2019 12:29:10 GMT 1
I opened my program using fullscreen on Windows XP then i went to a box where i can type in, i did press ALT+(251/246/243), i got Arabic letters (251=و), FEED = Second line the Unicode value (4 hexadecimal digits) (246=م), FEE1 = Second line the Unicode value (4 hexadecimal digits) (243=ق), FED5 = Second line the Unicode value (4 hexadecimal digits) Then what should i do? Note: My program is .bat not .exe here is the main.bat source which i use to access my program. @echo off
:AGAIN
CD\ACC\TOOLS
mainmenu %1
if errorlevel 7 goto OUT
if errorlevel 6 goto OUT
if errorlevel 5 goto OUT
if errorlevel 4 goto FXA
if errorlevel 3 goto PPR
if errorlevel 2 goto MGL
if errorlevel 1 goto STC
if errorlevel 0 goto OUT
:STC
cd\acc\stock
STOCK
cd\acc\stock
main
goto AGAIN
:MGL
cd\acc\mgl
gl
cd\acc\tools
main
goto AGAIN
:PPR
cd\acc\ppr
employee
cd\acc\tools
main
goto AGAIN
:FXA
cd\acc\fxa
fxa
cd\acc\tools
main
goto AGAIN
:VEH
cd\acc\vehicle
vehicle
cd\acc\tools
main
goto AGAIN
:LINK
cd\acc\link
link
cd\acc\tools
main
goto AGAIN
:COMM
cd\acc\tools
CALL COmain
CD\acc\TOOLS
goto AGAIN
:OUT
cd\
cls
|
|
|
Post by mahmoudskafi on Mar 4, 2021 13:39:44 GMT 1
Hello, any solution yet? @jos zakaria
|
|