Is there an explanation for the result of SET/P and CLIP?
Posted: 21 Mar 2015 05:15
I have come to an unexpected result when testing with my batch file. This result can also be generated at the prompt.
The first command displays the result correctly.
The second command copies the result to the clipboard. But when inserted into a program Japanese characters are displayed.
The first command displays the result correctly.
The second command copies the result to the clipboard. But here is the string is displayed correctly when pasted into a program.
Between the two parts there is only the difference that the letter "a" is a lowercase letter and other times once a capital letter.
This result is however only be applicable if the string has this structure:
a lowercase letter, two digits, round bracket, two digits, pipe symbol, two digits and round bracket
a15(51|62)
My questions are:
What explanation is there?
There are also these results in other versions of Windows? I use Win7.
Code: Select all
>echo. | set /p ".=a15(51|62)"
a15(51|62)
>echo. | set /p ".=a15(51|62)" | clip
>
The first command displays the result correctly.
The second command copies the result to the clipboard. But when inserted into a program Japanese characters are displayed.
Code: Select all
>echo. | set /p ".=A15(51|62)"
A15(51|62)
>echo. | set /p ".=A15(51|62)" | clip
>
The first command displays the result correctly.
The second command copies the result to the clipboard. But here is the string is displayed correctly when pasted into a program.
Between the two parts there is only the difference that the letter "a" is a lowercase letter and other times once a capital letter.
This result is however only be applicable if the string has this structure:
a lowercase letter, two digits, round bracket, two digits, pipe symbol, two digits and round bracket
a15(51|62)
My questions are:
What explanation is there?
There are also these results in other versions of Windows? I use Win7.