problem with writing a batch file with foreign characters

R

rachel cox

Hi all,

i'm trying to write a java applet that will write out an uninstaller
batch file for itself. Basically, it writes out a bunch of lines that
delete the files it installed. This works just fine. However, when the
files are located in a directory with an accent in them (for example
the machine name is french), the batch file doesn't work. When I look
at the file in CMD, the e (with accent) is changed to a u (with
accent). I am not sure how to get around this. I'm using a regular
FileOutputStream. I figure it's got something to do with unicode or
something, but I've tried several different charsets and nothing
changes.

Can someone help me here? Am I missing something? Any help would be
greatly appreciated?

Thanks!

Rachel
 
B

BarryNL

rachel said:
Hi all,

i'm trying to write a java applet that will write out an uninstaller
batch file for itself. Basically, it writes out a bunch of lines that
delete the files it installed. This works just fine. However, when the
files are located in a directory with an accent in them (for example
the machine name is french), the batch file doesn't work. When I look
at the file in CMD, the e (with accent) is changed to a u (with
accent). I am not sure how to get around this. I'm using a regular
FileOutputStream. I figure it's got something to do with unicode or
something, but I've tried several different charsets and nothing
changes.

Can someone help me here? Am I missing something? Any help would be
greatly appreciated?

You could try outputting via the OutputStreamWriter class. This is
designed to convert characters to the native platform representation.
Alternatively, if you use a FileWriter it uses an OutputStreamWriter
automatically.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top