Search found 3683 matches

by aGerman
21 Jan 2020 11:20
Forum: DOS Batch Forum
Topic: best way to encrypt passwords in cmd files?
Replies: 3
Views: 76

Re: best way to encrypt passwords in cmd files?

Password encryption in Batch is rather useless. So at least I don't do that at all, I don't think there is something like a "best way", and you better don't rely on things like that. However, if you want to use PowerShell try it that way: @echo off &setlocal set "password=P@ssw0rd" setlocal EnableDe...
by aGerman
18 Jan 2020 14:11
Forum: DOS Batch Forum
Topic: CONVERTCP.exe - Convert text from one code page to another
Replies: 104
Views: 53634

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

Conversions between UTF-8 and UTF-16 usually require to convert to an intermediate UTF-32 code unit (same as the Unicode code point). But ASCII characters already have the same value in both UTF-8 and UTF-16. Thus, it can be converted directly which improves the performance for text with latin chara...
by aGerman
28 Dec 2019 15:36
Forum: DOS Batch Forum
Topic: CONVERTCP.exe - Convert text from one code page to another
Replies: 104
Views: 53634

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

Oh, thanks for the reminder! I must have done something wrong when I uploaded the source file.
FWIW 1596 lines :)

Steffen
by aGerman
28 Dec 2019 05:55
Forum: DOS Batch Forum
Topic: CONVERTCP.exe - Convert text from one code page to another
Replies: 104
Views: 53634

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

I revised the validation of incoming UTF-8. Not sure if I already caught every invalid byte sequence in the previous version. Virustotal scans of version 7.3: x86: https://www.virustotal.com/gui/file/4f0bd3d66c64c94877762853b857a5a2d7a90c0c8e3e5ce7300106539a347dc5/detection x64: https://www.virustot...
by aGerman
27 Dec 2019 06:23
Forum: DOS Batch Forum
Topic: How to rename parts of filenames with certain target patterns?
Replies: 1
Views: 265

Re: How to rename parts of filenames with certain target patterns?

(from cmdline!) Then the line below requires to navigate to the target folder beforehand. Note I suppose "from cmdline" meant to be "not from within a Batch script". No difficult regular expressions I use FINDSTR which doesn't support difficult regular expressions anyway. So It's very basic regex. ...
by aGerman
26 Dec 2019 08:18
Forum: DOS Batch Forum
Topic: Heads-up: Cmd window now auto-refreshing after every command(?)
Replies: 5
Views: 360

Re: Heads-up: Cmd window now auto-refreshing after every command(?)

Hmm... Perhaps you used it along with the legacy console where it should still work. I could make insertbmp work again if I make it run as long as the console window exists. But that would either require START /B with all of its disadvantages or it would need to detach the console and probably run a...
by aGerman
26 Dec 2019 06:04
Forum: DOS Batch Forum
Topic: CONVERTCP.exe - Convert text from one code page to another
Replies: 104
Views: 53634

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: 104
Views: 53634

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: 356

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: 104
Views: 53634

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: 104
Views: 53634

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: 104
Views: 53634

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: 104
Views: 53634

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: 104
Views: 53634

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...