Search found 9 matches

by ayce
29 Dec 2021 14:22
Forum: DOS Batch Forum
Topic: issue with IF statement and weird character
Replies: 21
Views: 13874

Re: issue with IF statement and weird character

As I initially stated, and also mentioned by penpen above, it may simply be a chosen codepage issue. I'd suspect your actual character is most likely an extended ASCII upper or lower case i with a grave, or acute. So in codepage 1252 that would be dec 204 and 205 (hex CC and CD), or dec 236 and 237...
by ayce
29 Dec 2021 14:12
Forum: DOS Batch Forum
Topic: issue with IF statement and weird character
Replies: 21
Views: 13874

Re: issue with IF statement and weird character

My config is this: Active code page: 1252 Unless I'm wrong, that's pretty default... So, I'm somewhat further with analysis now. First of all : the character is meaningless, so I do't care too much what it is, and what it is meant for, my goal is to actually remove the character. But, to do that, I ...
by ayce
29 Dec 2021 13:52
Forum: DOS Batch Forum
Topic: issue with IF statement and weird character
Replies: 21
Views: 13874

Re: issue with IF statement and weird character

Just be aware everyone that the OP specifically stated I can type it in the command Which means that they do know what the character is, and how to type it, and there is therefore no reason for them not to provide that information. There's a flaw in the theory, which is the fact I'm faced with the ...
by ayce
29 Dec 2021 13:50
Forum: DOS Batch Forum
Topic: issue with IF statement and weird character
Replies: 21
Views: 13874

Re: issue with IF statement and weird character

It would help to know what special character you're talking about in particular. Steffen I can't paste it because the internal Windows text copy feature also removes it from the text being pasted Do the following: From the cmd.exe command-line, enter: dir > output.txt Open output.txt , Select all, ...
by ayce
28 Dec 2021 08:02
Forum: DOS Batch Forum
Topic: issue with IF statement and weird character
Replies: 21
Views: 13874

Re: issue with IF statement and weird character

The first thing you should note is that you are not using the recommended correct syntax for a string comparison with the IF command. What you should always use is: IF "X" == "" ECHO K Because the doublequotes protect possible poison characters If that alone does not fix your issue, then I'd sugges...
by ayce
28 Dec 2021 07:53
Forum: DOS Batch Forum
Topic: issue with IF statement and weird character
Replies: 21
Views: 13874

Re: issue with IF statement and weird character

You need to find a way to get the name into a file where you can observe the value of the characters using a HEX editor. Steffen That would be great, but I'm not sure how to do that. To be clear, then we would like to get the name of the file, not the content, listed as a hexadecimal result. I'm ac...
by ayce
28 Dec 2021 07:46
Forum: DOS Batch Forum
Topic: issue with IF statement and weird character
Replies: 21
Views: 13874

Re: issue with IF statement and weird character

If the character is unprintable, how come I see it, using DIR in CMD, and in the name of the file in my Windows Explorer ? My Windows is not setup for any exotic language or so. When it is unprintable, how do I end up describing how the character looks ? The issue actually is not the IF command, the...
by ayce
28 Dec 2021 05:17
Forum: DOS Batch Forum
Topic: issue with IF statement and weird character
Replies: 21
Views: 13874

Re: issue with IF statement and weird character

It would help to know what special character you're talking about in particular. Steffen I can't paste it because the internal Windows text copy feature also removes it from the text being pasted It looks like a vertical line, like a pipe symbol, but then it also has something going to the right, o...
by ayce
27 Dec 2021 17:36
Forum: DOS Batch Forum
Topic: issue with IF statement and weird character
Replies: 21
Views: 13874

issue with IF statement and weird character

I'm testing some code to handle 1-character checks and functions in a CMD script, and I stumbled on this: C:\> if X+==+ echo K K C:\> BUT - I changed the command slightly, in the way that the X is a special character, not just the letter X. When I tried to copy this full command, Windows didn't allo...