Search found 8 matches

by BatchGuy
10 Feb 2020 17:24
Forum: DOS Batch Forum
Topic: CONVERTCP.exe - Convert text from one code page to another
Replies: 134
Views: 216457

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

Waw, hard to believe I missed that! :oops:
The 1st line in my DOS box is always "Usage" (which is the 3rd output line for /?), but still...

Thx,

BG
by BatchGuy
10 Feb 2020 12:17
Forum: DOS Batch Forum
Topic: CONVERTCP.exe - Convert text from one code page to another
Replies: 134
Views: 216457

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

Steffen, does ConvertCP have a built-in feature which allows to know which version it is? Can't find anything of the kind in the tool's syntax, but maybe there's an easy workaround? The "ConvertCP.exe" file which I occasionally use, could be any version... It might be easier to check the version of ...
by BatchGuy
10 Dec 2019 16:31
Forum: DOS Batch Forum
Topic: Split string to characters
Replies: 32
Views: 38559

Re: Split string to characters

The error message flashing by when my batch crashed, is indeed sth. like " ( was unexpected at this time." Which I couldn't figure out at all until now, thx to your highly appreciated clarification. And sort of confirms that the weird cmd.exe design --- if any --- is really rocket science! :? BG
by BatchGuy
10 Dec 2019 12:04
Forum: DOS Batch Forum
Topic: Split string to characters
Replies: 32
Views: 38559

Re: Split string to characters

Weird, but nice catch!
And good to realize that it just may be worth to try & change the comparison order if that block unexpectedly makes one's batch crash.

BG
by BatchGuy
10 Dec 2019 08:54
Forum: DOS Batch Forum
Topic: Split string to characters
Replies: 32
Views: 38559

Re: Split string to characters

Hi Steffen, I finally decided to work back from the code I posted in Message #21 . This code works alright, as you confirmed. Next, I re-introduced some of the variables which I had replaced by constant values for easier reading. I.e. set "find_equ==" set "replace_equ=¡" and the test line IF "%name1...
by BatchGuy
15 Nov 2019 11:54
Forum: DOS Batch Forum
Topic: Split string to characters
Replies: 32
Views: 38559

Re: Split string to characters

It might be helpful if you tell us about your Windows version, text editor, and encoding you used to save the code. Windows version was mentioned already (Win7 Ultimate, x64). Batch is written in Notepad, and is a proper ANSI txt file. (as required for batches, if I'm not mistaken) BatchGuy EDIT: r...
by BatchGuy
15 Nov 2019 11:18
Forum: DOS Batch Forum
Topic: Split string to characters
Replies: 32
Views: 38559

Re: Split string to characters

Hi Steffen, I'm still not sure if my issue is Code Page related. Granted, my on-screen display is blurred by rubbish displayal of both "exotic" characters I use, but whatever I try, I cannot get this test string (ULR) correct on my screen. My machine's CP is 850, but none of the regular CP values I ...
by BatchGuy
13 Nov 2019 13:59
Forum: DOS Batch Forum
Topic: Split string to characters
Replies: 32
Views: 38559

Re: Split string to characters

This is another, simpler method: @echo off set mystring=example :loop if defined mystring ( echo(%mystring:~0,1% set "mystring=%mystring:~1%" goto loop ) Hi, I may be late for even the afterparty, but maybe it's worth reviving. I tried to adapt Aacini's most elegant technique to browse through a te...