MSDOS accents & special characters

PRK Posted messages 799 Registration date   Status Membre Last intervention   -  
 2001music -
Hello,

I have a little problem, I would like to program .bat files that would clean up certain directories on my computer, and when one of my directories has an accent on a letter, my bat file tells me that the path is not found. So far, that's normal.

However, I would like to know what combination to use for DOS to understand the following characters:

é
è
ê

Thank you in advance :)

EDIT: I forgot to share the path in question:

C:\Documents and Settings\XXX\Menu Démarrer\Programmes\Démarrage

--
(^°°)> -----> < *__* >
Configuration: Windows XP Firefox 2.0.0.3

3 réponses

carbon3 Posted messages 471 Status Membre 73
 
Hi,
it's probably because you're creating your file with Notepad or another Windows app that uses ANSI encoding while DOS uses ASCII encoding.
The best I've found is to create batch files using the DOS editor --> the EDIT command in console mode.
This should work better.
For extra safety, you can also enclose your paths in quotes to handle spaces...

;-)
0
PRK Posted messages 799 Registration date   Status Membre Last intervention   117
 
My first draft was done with EDIT and I just have an error on the path :s

So I went back to Powerbatch but I can't write this path correctly :s
--
(^°°)> -----> < *__* >
0
karirovax Posted messages 3584 Status Membre 215
 
hello

you can do the reverse, that is to say:

@echo off
echo é >test.txt
echo è >>test.txt
echo ê >>test.txt
notepad test.txt


so the generated file contains the characters é, è, and ê

example of the ASCII code for the character é

é = Alt+0130

karirovax ;)
-1
2001music
 
It's resolved, the problem is with the accent characters on uppercase letters.
0