Insert accents in a batch
akyrion
-
Balafatch -
Balafatch -
Bonjour, I would like to use the following command in a *.bat but the accents don’t work… how can I do that?
C:\Documents and Settings\All Users\Start Menu\Programs\Startup\Quick Launch of Adobe Reader.lnk
C:\Documents and Settings\All Users\Start Menu\Programs\Startup\Quick Launch of Adobe Reader.lnk
14 answers
-
Hello everyone,
I recently faced the same problem, and I found a much simpler solution:
Open your bat file with WordPad, and if you can't find it, type wordpad.exe in the command prompt.
And save your file as an MS-DOS text document.
Voila !!! All your special characters have been converted! -
I found a more logical solution than using Wordpad while crossing my fingers hoping it would work... Use Notepad++, click on Encoding in the menu bar, then on Character encoding > Arabic > OEM 720, and there you go, you can enter your accented letters and see them appear correctly.
-
Mmmh, here’s how I proceed ; - ) :
https://openclassrooms.com/forum/sujet/gravez-vos-fichiers-en-invite-23139#r2079981
I know the topic may not seem related, but I explain it in one of the messages in the thread.
P.S. Sorry to the moderators if you think I'm bumping an old thread.
Here’s an example of using accents:
@echo off
echo €a uses accented characters in Batch ;).
set /p test=Please enter accented characters:
echo %test%
%homedrive%
cd C:\Documents and Settings\Owner\Desktop
echo If the Owner directory does not exist, ignore the error message.
cd
pause
cls
echo Deleting the directory …†…. If it is not present, ignore the error message.
rd …†…
Place this .bat file on the desktop and execute it. There you go!
Finally, look at my link, I typed a complete table of character conversions. In about a day, I will also post a .doc (Word) sheet that contains all the characters that "should not be used in a batch". I say this in quotes. Because some people say it’s impossible and others like me say yes :D.
One last thing, I'm just passing through this site. I noticed this thread on Google and couldn't help but reply. I also want to let you know that I will come back to check the replies to this thread.
With that, see you next time. -
Hello!
If you use Notepad ++ to create your batch programs, encode it in "OEM 850"
--
Advanced batcher -
Well, okay... so the simplest (I think) is to use a DOS text editor like edit... (edit is supplied with Windows)
-
well change your directory shortcut.... :D
Otherwise, maybe you should check with unicode characters to see if that works...
Zep3k!GnO
-->hi i hi o we're not going to work :P -
For my part, I solved the problem in Notepad by changing the encoding to ANSI in the "Save as..." window.
-
Ahaha yeah sure I'm going to change my rep ^^
I want to delete a shortcut installed by Adobe Reader ^^
Anyway, the unicode characters ??-
Yes, yes, you can remove what Adobe added, no problem regarding the shortcut...
Anyway, the unicode characters ??
Here you go, sir :D
-->http://www.collectionscanada.ca/6/19/s19-9235-f.html
You'll see ..
Zep3k!GnO
-->hi i hi o we're not going to work :P
-
-
-
-
For your information, I also had a problem with accents in a batch file and came across your discussion which made me think and remember the creation of batch files under Windows 3.1 (it doesn’t make us any younger!!!!!).
There is an editor provided with DOS by simply typing the command EDIT which allowed me to solve my problem without going through UltraEDIT. It’s true that it’s not the latest thing in terms of editors, but it works very well and the accents too...
-
-
Hello... to solve the original problem, it seems better to use the short names from MS-DOS
like "c:\docume~1\user\mesdoc~1"
instead of "c:\documents and settings\user\my documents"-
I completely agree with you although your answer doesn't provide any solutions to my problem.
No worries about going to c:\progra~1\micros~1 etc., etc.
However, for the Models directory (which is only 7 characters long), the batch edited with a notepad returns a "weird" character for the accented character. When using the DOS editor (EDIT), the character returned is the correct one.
The end.
P.
-
-
-
-
Hello,
I'm having the same accent issue in my batch files. I've tried your suggestions using EDIT... it converted my é into a u with an acute accent.... so my problem remains unsolved... solution? -