1.

Solve : cmd line command and Unicode?

Answer»

Hi, I'm trying to obtain text files in Unicode format, via the command:

cmd /u /c type myfile.txt>myunicodefile.txt

as suggested here:
http://www.dostips.com/?t=Snippets.AnsiToUnicode

I also gave a look to the cmd specifications.

I have to do that to several files, so I call that from a script (written in Scilab).
The file is CREATED in Unicode, but i find that the "è" character and similar are translated in others.
Is there a way to obtain the file with the "è" not changed?

thank you very muchtry setting codepage 1252
Any hint about how to do that? I'm just going crazy

Or... let's change strategy:
when I use that cmd command line, in my Unicode output file i find the "è" changed in "Þ", the thorn character (can you see it?).
I think that if I change the "è" in the ANSI input file, with another character, i could find it changed back in "è" in the Unicode output file. But with what character do I have to replace the "è"?

Many THANKS Found! "Š"
Quote from: mauro012345 on May 15, 2012, 01:55:10 AM

Any hint about how to do that? I'm just going crazy

Google "cmd change code page", but I'll tell you if you don't know how to do that.

chcp 1252
Quote from: mauro012345 on May 14, 2012, 08:19:11 AM
Hi, I'm trying to obtain text files in Unicode format, via the command:

cmd /u /c type myfile.txt>myunicodefile.txt

as suggested here:
http://www.dostips.com/?t=Snippets.AnsiToUnicode

I also gave a look to the cmd specifications.

I have to do that to several files, so I call that from a script (written in Scilab).
The file is created in Unicode, but i find that the "è" character and similar are translated in others.
Is there a way to obtain the file with the "è" not changed?

thank you very much
So you used a tip from the dostips.com website but then came here asking how to use it? Why didn't you just post on the dostips.com forums?Quote from: Squashman on May 15, 2012, 03:51:20 PM
So you used a tip from the dostips.com website but then came here asking how to use it? Why didn't you just post on the dostips.com forums?
Didn't know they have a forum

Anyway my SOLUTION didn't work as I expected. In fact, I had to start from UTF-8 and reach the Unicode format and that's not so easy! This "è" is driving me crazy...
I'll give a look to the Salmon hint, thanks.Quote from: mauro012345 on May 17, 2012, 08:34:32 AM
Didn't know they have a forum

Anyway my solution didn't work as I expected. In fact, I had to start from UTF-8 and reach the Unicode format and that's not so easy! This "è" is driving me crazy...
I'll give a look to the Salmon hint, thanks.
Click the link you posted and SCROLL down!lol... there is forum there!


Discussion

No Comment Found