Batch Dos Unicode compatibility

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
darioit
Posts: 230
Joined: 02 Aug 2010 05:25

Batch Dos Unicode compatibility

#1 Post by darioit » 04 Dec 2011 02:40

Batch Dos is Compatible with unicode, because on windows server 2008 R2 it's seems that ignore my region setting

I think it's something related on language non-unicode than this setting are different from language format

Anyone could explain better this problem
Regards

orange_batch
Expert
Posts: 442
Joined: 01 Aug 2010 17:13
Location: Canadian Pacific
Contact:

Re: Batch Dos Unicode compatibility

#2 Post by orange_batch » 04 Dec 2011 04:17

I'm not sure what you mean, but some of the technicalities are:

Where command prompt does not support unicode:
-Trying to read any unicode from a text file in any mode or context (such as for, type, or redirection), though maybe with a specifically programmed external utility, it might be possible. I don't know of any that exist.

Where command prompt supports unicode:
-When scripts are initialized by Windows, arguments passed retain unicode.
-Input typed by the user.
-Redirecting output to a file with cmd /u (UTF16-LE, or "Unicode" as Notepad refers it specifically).
-Despite command prompt being unable to read unicode from a text file, commands can match paths where ? have replaced unicode characters, such as dir and for /d, which can then be used to retrieve the unicode characters (with the right scripting).

darioit
Posts: 230
Joined: 02 Aug 2010 05:25

Re: Batch Dos Unicode compatibility

#3 Post by darioit » 05 Dec 2011 10:38

because I have a new Server 2008 R2 in English language
Old server is windows 2003 SP2 in English language

The regional setting are all in italial, like date and also program non-unicode

When I connect with remote user to old server (2003) with a user pippo, my script start in italian
When I connect with remote user to new server (2008) with a user pippo, my script start in english

My script start in italian on new server (2008) only if I have already that user logged on

This is strange, what did you think could be my problem?

Regards
Dario

aGerman
Expert
Posts: 4736
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Batch Dos Unicode compatibility

#4 Post by aGerman » 05 Dec 2011 14:56

That's a problem of your settings and has probably nothing to do with Batch.
Not sure about Windows Server (also I don't know whether my translation for the steps is right).
Try:
Start>Control Panel>Regional and Lanuage Options
Select the right settings.
Now select the last tab (Administration) click on Copy Settings and select both check boxes (welcome site and system accounts; new accounts) in the next window.

Perhaps one of the native English could correct my faults.

Regards
aGerman

darioit
Posts: 230
Joined: 02 Aug 2010 05:25

Re: Batch Dos Unicode compatibility

#5 Post by darioit » 06 Dec 2011 04:04

Hello aGerman,

another time you're right, the only flag missing is "welcome screen new user accounts setting"

After setting flag to "copy your current setting to:" the problem was solved

The voice changed is "Welcome Screen Format" to Italian language and
"New User Account formato" to Italian language

Now I want to write a Script that ignore any localization, read data from Registry, and adapt it to any windows localization

Stay tuned
Regards

Post Reply