Search found 3737 matches

by aGerman
26 Dec 2019 06:04
Forum: DOS Batch Forum
Topic: CONVERTCP.exe - Convert text from one code page to another
Replies: 107
Views: 83686

Re: CONVERTCP.exe - Convert text from one code page to another

I incorporated custom conversions from UTF-8 to UTF-16 and vice versa because of buggy API functions on XP. (See the discussion above.) Finally it was not necessary to determine the Windows version and branch the code. The speed of my own functions is now comparable. And if used along with option /v...
by aGerman
25 Dec 2019 16:20
Forum: DOS Batch Forum
Topic: CONVERTCP.exe - Convert text from one code page to another
Replies: 107
Views: 83686

Re: CONVERTCP.exe - Convert text from one code page to another

Thanks Saso! The French user who reported this bug also confirmed that it has been fixed now. As long as the performance doesn't suffer, I'll try to support XP. Currently I'm working on Carlos' suggestion to override the UTF-8 bug of the XP API functions. I got my own U8ToU16 and U16ToU8 functions t...
by aGerman
24 Dec 2019 12:56
Forum: DOS Batch Forum
Topic: How do I....
Replies: 3
Views: 1254

Re: How do I....

JREPL maybe?
viewtopic.php?f=3&t=6044

Code: Select all

cmd /c jrepl.bat " East\b" "" /f "guide.xml|utf-8" /o -
Note that the original file will be overwritten.

Steffen
by aGerman
24 Dec 2019 12:20
Forum: DOS Batch Forum
Topic: CONVERTCP.exe - Convert text from one code page to another
Replies: 107
Views: 83686

Re: CONVERTCP.exe - Convert text from one code page to another

OK, I'll implement it in one of the next versions. This requires extensive code profiling beforehand. I'm afraid it would destroy the performance of the tool otherwise :wink:
by aGerman
24 Dec 2019 10:41
Forum: DOS Batch Forum
Topic: CONVERTCP.exe - Convert text from one code page to another
Replies: 107
Views: 83686

Re: CONVERTCP.exe - Convert text from one code page to another

Yes I know this bug :lol: In other words, WideCharToMultiByte converts to CESU-8 instead of UTF-8 on XP. Fortunately this isn't quite relevant most of the time. It's rather seldom that you'll find surrogate pairs in UTF-16 natural language text. Some CJK characters require it. Actually the conversio...
by aGerman
24 Dec 2019 08:36
Forum: DOS Batch Forum
Topic: CONVERTCP.exe - Convert text from one code page to another
Replies: 107
Views: 83686

Re: CONVERTCP.exe - Convert text from one code page to another

Hi Carlos. Looking at the statistics makes me wonder if you were the only one who ever downloaded the source code :lol: Seriously. The reason to move the project to SourceForge was that discussions about the C source would be rather off topic at DosTips. But apparently nobody really cares about the ...
by aGerman
24 Dec 2019 06:21
Forum: DOS Batch Forum
Topic: CONVERTCP.exe - Convert text from one code page to another
Replies: 107
Views: 83686

Re: CONVERTCP.exe - Convert text from one code page to another

I received the information that option /l is broken on XP. The update to v7.1 is supposed to fix that. Although I have to wait for feedback since I can't test on XP anymore. Virustotal scans of version 7.1: x86: https://www.virustotal.com/gui/file/86099ad973b84af66e2e4e517d8a6d67b66222e2c6246b0747a7...
by aGerman
23 Dec 2019 16:10
Forum: DOS Batch Forum
Topic: CONVERTCP.exe - Convert text from one code page to another
Replies: 107
Views: 83686

Re: CONVERTCP.exe - Convert text from one code page to another

Version 7 pretty much supports what Saso suggested in post #13. While he later referenced EBCDIC (which already worked using CONVERTCP), I recently received an inquiry to support an old Bulgarian DOS charset called "MIK" . This does neither have a code page ID, nor is it installed on Windows. As lon...
by aGerman
23 Dec 2019 05:30
Forum: DOS Batch Forum
Topic: How do I find an error in the for loop if there is no directory found?
Replies: 1
Views: 1011

Re: How do I find an error in the for loop if there is no directory found?

The command line enclosed in single quotes runs in a separate cmd.exe process. That's the reason why you can't get the errorlevel. If you don't have subfolders in %cd% the loop body is never executed. You may use a helper variable. set "folders_present=" for /f "tokens=*" %%a in ('dir "%cd%" /a:d /b...
by aGerman
22 Dec 2019 08:33
Forum: DOS Batch Forum
Topic: Convert Linux script
Replies: 2
Views: 1137

Re: Convert Linux script

The error is about a SET /A statement that you don't have in your snippet anymore. Try: @echo off &setlocal set /p "passwrd=Enter your password: " set /a "n=100,max=200" setlocal EnableDelayedExpansion for /l %%X in (%n%,1,%max%) do ( if not exist "C:\multiboinc\BOINC_%%X\" md "C:\multiboinc\BOINC_%...
by aGerman
21 Dec 2019 06:27
Forum: DOS Batch Forum
Topic: CmdRunner - 3d game (CubeRunner clone)
Replies: 44
Views: 17338

Re: CmdRunner - 3d game (CubeRunner clone)

Begin your script with @echo on and you will discern that your loop didn't break even if the output of the body doesn't show up anymore. Alternatively, take a big number such like for /l %%A in (0,1,1000000) do ( and you will see that it takes ages until you get to the PAUSE prompt. We already had l...
by aGerman
20 Dec 2019 07:04
Forum: DOS Batch Forum
Topic: CmdRunner - 3d game (CubeRunner clone)
Replies: 44
Views: 17338

Re: CmdRunner - 3d game (CubeRunner clone)

I assume you read Antonio's answer? You can't break a FOR /L loop in the running process. That might be a cmd.exe bug. But don't hope that it will be fixed. Microsoft explained several times that they won't update cmd.exe anymore.

Steffen
by aGerman
16 Dec 2019 11:41
Forum: DOS Batch Forum
Topic: Enable and Start Service on entire subnet remotely
Replies: 2
Views: 1268

Re: Enable and Start Service on entire subnet remotely

Sounds to me like you just need a FOR /L loop and you are done

Code: Select all

for /l %%i in (1 1 254) do (
  sc \\192.168.100.%%i config remoteregistry start= auto
  sc \\192.168.100.%%i start remoteregistry
)
Steffen
by aGerman
16 Dec 2019 05:39
Forum: DOS Batch Forum
Topic: Using the rename command
Replies: 9
Views: 1854

Re: Using the rename command

It's not intended to close a topic. If you want to mark your question as solved you may edit your initial post and prepend something like [solved] to the subject.

Steffen