1
I've been trying to find a solution to this, but I wrote a basic program to automatically produce an "outage" report more or less, that I need copied into the clipboard so that I can paste it into a mainframe system. It needs to be in English and French, but the French accents are not copying properly... Is there anyway around this - to include the variables?
The output will basically be this le système ne
(clipped out the rest).
Any assistance would be greatly appreciated.
This is that I have so far:
if "%SRSST%"=="n" (
(
echo *** IMSNEWS ***
echo.
echo On Sunday, %DATEME% %DT%%DATEST% %DATEYR%, There will be no
echo system outage.
) | Clip )else (
echo *** IMSNEWS ***
echo.
echo On Sunday, %DATEME% %DT%%DATEST% %DATEYR%, the system will not
echo be available between %SRSST% - %SRSET% for regular
echo weekly maintenance.
) | Clip
timeout /t 5
if "%SRSST%"=="n" (
(
echo *** NOUVELLES ***
echo.
echo Le dimanche %DT% %DATEME%, %DATEYR%, Il n'y aura pas
echo d'interruption du système
) | Clip )else (
echo *** NOUVELLES ***
echo.
echo Le dimanche %DT% %DATEME%, %DATEYR%, le système ne
echo sera pas disponible entre %SRSST% - %SRSET% pour la
echo maintenance hebdomadaire.
) | Clip
goto Menu
"and the French accents are copying properly" If they're copying properly, then what's the problem exactly? Or was that a typo? – Ƭᴇcʜιᴇ007 – 2016-04-29T18:24:44.273
They are not copying properly at all > it's showing
système ne
instead ofsystème
- as an example (in notepad) – Bob G – 2016-04-29T18:25:40.137Seems to work fine here... Perhaps the target (the "mainframe system") you're pasting into is the problem... If you paste what it puts onto the clipboard into Notepad, does it display properly? – Ƭᴇcʜιᴇ007 – 2016-04-29T18:26:32.203
Sorry - just to be clear, when the output is pasted into notepad (or any other system) the character "è" looks like "├¿" – Bob G – 2016-04-29T18:28:20.870
Well that's weird, like I said it works fine here (Windows 7 English). Which version of Windows are you using? What install language is it (English, French, or ???)? – Ƭᴇcʜιᴇ007 – 2016-04-29T18:30:39.350
If you open a command prompt and run
chcp
, which code page is reported? – Ƭᴇcʜιᴇ007 – 2016-04-29T18:32:54.377Using windows 7 as well - in English. but if it works for you, perhaps I'm having a windows issue... I'll have to test it on another pc – Bob G – 2016-04-29T18:33:52.897
Active code page: 437 – Bob G – 2016-04-29T18:34:22.303
Yup, that's the code page I would expect. Yeah that's just weird. :) Like I said it works fine here: image
– Ƭᴇcʜιᴇ007 – 2016-04-29T18:39:57.737Yep.. so I tested that typing directly from cmd prompt, and it does in fact work. but not from the batch file itself.... – Bob G – 2016-04-29T18:53:34.260
chcp 1252
fixes the problem. Answer added. – DavidPostill – 2016-04-29T19:26:33.900@Ƭᴇcʜιᴇ007 Works from the command line but not in a batch file. Changing the code page in the batch file fixes it (I'm not sure why exactly) – DavidPostill – 2016-04-29T19:37:02.987
The example picture I stick in my comment is a shot of it being run from a batch file.. Weird.. – Ƭᴇcʜιᴇ007 – 2016-04-29T19:43:36.227