What encoding to get Å Ä Ö to work












11















I'm writing a small application in VB.net that will enable me to easy create a user "Windows 7 account" with a password, instead of going though the control panel. The problem I'm having is that when I create a bat file in VB.net using UTF-8 encoding it's doesn't write å ä ö as it's suppose to be. I have tried all encodings I can find but are unable to get it working.



If anyone got an idea on why I'm getting this please let me know.
Thanx in advance!










share|improve this question























  • try posting on stackoverflow.com and show your script.

    – Toby Allen
    Nov 13 '13 at 11:34








  • 1





    @Toby Allen Well it's not really a programming question but a question about encoding text, the same problem occurs when I create a .bat file the "normal" way.

    – kagstrom2100
    Nov 13 '13 at 11:37
















11















I'm writing a small application in VB.net that will enable me to easy create a user "Windows 7 account" with a password, instead of going though the control panel. The problem I'm having is that when I create a bat file in VB.net using UTF-8 encoding it's doesn't write å ä ö as it's suppose to be. I have tried all encodings I can find but are unable to get it working.



If anyone got an idea on why I'm getting this please let me know.
Thanx in advance!










share|improve this question























  • try posting on stackoverflow.com and show your script.

    – Toby Allen
    Nov 13 '13 at 11:34








  • 1





    @Toby Allen Well it's not really a programming question but a question about encoding text, the same problem occurs when I create a .bat file the "normal" way.

    – kagstrom2100
    Nov 13 '13 at 11:37














11












11








11


0






I'm writing a small application in VB.net that will enable me to easy create a user "Windows 7 account" with a password, instead of going though the control panel. The problem I'm having is that when I create a bat file in VB.net using UTF-8 encoding it's doesn't write å ä ö as it's suppose to be. I have tried all encodings I can find but are unable to get it working.



If anyone got an idea on why I'm getting this please let me know.
Thanx in advance!










share|improve this question














I'm writing a small application in VB.net that will enable me to easy create a user "Windows 7 account" with a password, instead of going though the control panel. The problem I'm having is that when I create a bat file in VB.net using UTF-8 encoding it's doesn't write å ä ö as it's suppose to be. I have tried all encodings I can find but are unable to get it working.



If anyone got an idea on why I'm getting this please let me know.
Thanx in advance!







windows-7 encoding vb.net






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 13 '13 at 11:20









kagstrom2100kagstrom2100

78116




78116













  • try posting on stackoverflow.com and show your script.

    – Toby Allen
    Nov 13 '13 at 11:34








  • 1





    @Toby Allen Well it's not really a programming question but a question about encoding text, the same problem occurs when I create a .bat file the "normal" way.

    – kagstrom2100
    Nov 13 '13 at 11:37



















  • try posting on stackoverflow.com and show your script.

    – Toby Allen
    Nov 13 '13 at 11:34








  • 1





    @Toby Allen Well it's not really a programming question but a question about encoding text, the same problem occurs when I create a .bat file the "normal" way.

    – kagstrom2100
    Nov 13 '13 at 11:37

















try posting on stackoverflow.com and show your script.

– Toby Allen
Nov 13 '13 at 11:34







try posting on stackoverflow.com and show your script.

– Toby Allen
Nov 13 '13 at 11:34






1




1





@Toby Allen Well it's not really a programming question but a question about encoding text, the same problem occurs when I create a .bat file the "normal" way.

– kagstrom2100
Nov 13 '13 at 11:37





@Toby Allen Well it's not really a programming question but a question about encoding text, the same problem occurs when I create a .bat file the "normal" way.

– kagstrom2100
Nov 13 '13 at 11:37










2 Answers
2






active

oldest

votes


















9














Edit: I was wrong ;)
cmd.exe does accept UTF-8 but you need to be sure to save it without the BOM at the beginning of the file.



Here is a second test. You can use chcp 65001 at the beginning of your batch-file.



enter image description here





A batch file can not be of type UTF-8. It needs to be ASCII. Cmd.exe just doesn't accept another format. I did a small test and you can use your characters but it needs some work.



Make a file test.bat with echo Å Ä Ö. Save it with format ANSI/ASCII. Open a cmd.exe and make sure your cmd.exe uses Lucida Console (to display the Unicode characters).



When you type the file it will show characters as the old DOS-characters. You can see a translation chart here.



When you switch to a "Windows Ansi"-code page (i.e. West European Latin) with chcp 1252 the characters are displayed correctly. If they also get transferred to their respective utilities depends on that utility.



But why are you creating a batch-file for this? Can't you just code it in VB.net?



cmd.exe





Edit 2#:



This is how you set Lucida Console in cmd.exe:



Lucida Console





The BOM are 3 characters at the beginning of a UTF-8 file. (xEFxBBxBF).

In VB.net you would create a file without a BOM like this:



Dim utf8WithoutBom As New System.Text.UTF8Encoding(False)
'^^^^^'
Using sink As New StreamWriter("Foobar.txt", False, utf8WithoutBom)
sink.WriteLine("...")
End Using





share|improve this answer


























  • Hi and thanx for the answer. In my vb.net application I'm trying to create a .bat file with the commands: net user "username" net localgroup administratörer "type" /add The reason i have to use the Swedish word adminstratörer instead of administator is beause localgroup won't take the English translation as a group.

    – kagstrom2100
    Nov 14 '13 at 9:10













  • Just thought going through a .bat-file was a bit much when you could do this straight from VB.net. Like here. Lots of examples in Google too. So no need to create a .bat as middle-man. And with those examples you could feed the Unicode-name directly to the Windows-function. (Unless you need to run the .bat at a different time separate from your VB.net app for some reason?)

    – Rik
    Nov 14 '13 at 9:31













  • Well I have been looking for a way to do this in VB.net on Google for days, though I haven't found any way do do it. I already tried the example you linked and it didn't seem to work. How do I make sure that the .bat file doesn't use BOM? Also what is Lucida Console? The only info I could find about it is that it's a font. When I try the exact thing you did in the second example/image I get this i.imgur.com/6sh20j0.jpg

    – kagstrom2100
    Nov 14 '13 at 9:36











  • I added to my answer to include Lucida Console and file-creation without BOM (Edit #2, at the bottom). But does creating this user via net user work on the command-prompt? And what does not work if you create it via VB.net? For this we would need some example-code (or a separate question) because this should work. (BTW you linked my image, not yours, i think, in your comment)

    – Rik
    Nov 14 '13 at 10:41








  • 2





    @JohnLBevan Yeah, you're right. Apparently find doesn't handle UTF-8 input not too well. But you can use findstr. Like this: ping 127.0.0.1 -n 2 | findstr /C:" = "

    – Rik
    Apr 16 '15 at 19:01





















2














The thing that fixed this for me was to save the file as UTF-8 without BOM and using this code



@echo off
chcp 65001
net user Linus /add
net localgroup Administratörer Test/add


The thing I didn't use before was @echo off so that and using chcp 65001 is what fixed it! Thanx too Rik for all the help :)






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f675369%2fwhat-encoding-to-get-%25c3%2585-%25c3%2584-%25c3%2596-to-work%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    9














    Edit: I was wrong ;)
    cmd.exe does accept UTF-8 but you need to be sure to save it without the BOM at the beginning of the file.



    Here is a second test. You can use chcp 65001 at the beginning of your batch-file.



    enter image description here





    A batch file can not be of type UTF-8. It needs to be ASCII. Cmd.exe just doesn't accept another format. I did a small test and you can use your characters but it needs some work.



    Make a file test.bat with echo Å Ä Ö. Save it with format ANSI/ASCII. Open a cmd.exe and make sure your cmd.exe uses Lucida Console (to display the Unicode characters).



    When you type the file it will show characters as the old DOS-characters. You can see a translation chart here.



    When you switch to a "Windows Ansi"-code page (i.e. West European Latin) with chcp 1252 the characters are displayed correctly. If they also get transferred to their respective utilities depends on that utility.



    But why are you creating a batch-file for this? Can't you just code it in VB.net?



    cmd.exe





    Edit 2#:



    This is how you set Lucida Console in cmd.exe:



    Lucida Console





    The BOM are 3 characters at the beginning of a UTF-8 file. (xEFxBBxBF).

    In VB.net you would create a file without a BOM like this:



    Dim utf8WithoutBom As New System.Text.UTF8Encoding(False)
    '^^^^^'
    Using sink As New StreamWriter("Foobar.txt", False, utf8WithoutBom)
    sink.WriteLine("...")
    End Using





    share|improve this answer


























    • Hi and thanx for the answer. In my vb.net application I'm trying to create a .bat file with the commands: net user "username" net localgroup administratörer "type" /add The reason i have to use the Swedish word adminstratörer instead of administator is beause localgroup won't take the English translation as a group.

      – kagstrom2100
      Nov 14 '13 at 9:10













    • Just thought going through a .bat-file was a bit much when you could do this straight from VB.net. Like here. Lots of examples in Google too. So no need to create a .bat as middle-man. And with those examples you could feed the Unicode-name directly to the Windows-function. (Unless you need to run the .bat at a different time separate from your VB.net app for some reason?)

      – Rik
      Nov 14 '13 at 9:31













    • Well I have been looking for a way to do this in VB.net on Google for days, though I haven't found any way do do it. I already tried the example you linked and it didn't seem to work. How do I make sure that the .bat file doesn't use BOM? Also what is Lucida Console? The only info I could find about it is that it's a font. When I try the exact thing you did in the second example/image I get this i.imgur.com/6sh20j0.jpg

      – kagstrom2100
      Nov 14 '13 at 9:36











    • I added to my answer to include Lucida Console and file-creation without BOM (Edit #2, at the bottom). But does creating this user via net user work on the command-prompt? And what does not work if you create it via VB.net? For this we would need some example-code (or a separate question) because this should work. (BTW you linked my image, not yours, i think, in your comment)

      – Rik
      Nov 14 '13 at 10:41








    • 2





      @JohnLBevan Yeah, you're right. Apparently find doesn't handle UTF-8 input not too well. But you can use findstr. Like this: ping 127.0.0.1 -n 2 | findstr /C:" = "

      – Rik
      Apr 16 '15 at 19:01


















    9














    Edit: I was wrong ;)
    cmd.exe does accept UTF-8 but you need to be sure to save it without the BOM at the beginning of the file.



    Here is a second test. You can use chcp 65001 at the beginning of your batch-file.



    enter image description here





    A batch file can not be of type UTF-8. It needs to be ASCII. Cmd.exe just doesn't accept another format. I did a small test and you can use your characters but it needs some work.



    Make a file test.bat with echo Å Ä Ö. Save it with format ANSI/ASCII. Open a cmd.exe and make sure your cmd.exe uses Lucida Console (to display the Unicode characters).



    When you type the file it will show characters as the old DOS-characters. You can see a translation chart here.



    When you switch to a "Windows Ansi"-code page (i.e. West European Latin) with chcp 1252 the characters are displayed correctly. If they also get transferred to their respective utilities depends on that utility.



    But why are you creating a batch-file for this? Can't you just code it in VB.net?



    cmd.exe





    Edit 2#:



    This is how you set Lucida Console in cmd.exe:



    Lucida Console





    The BOM are 3 characters at the beginning of a UTF-8 file. (xEFxBBxBF).

    In VB.net you would create a file without a BOM like this:



    Dim utf8WithoutBom As New System.Text.UTF8Encoding(False)
    '^^^^^'
    Using sink As New StreamWriter("Foobar.txt", False, utf8WithoutBom)
    sink.WriteLine("...")
    End Using





    share|improve this answer


























    • Hi and thanx for the answer. In my vb.net application I'm trying to create a .bat file with the commands: net user "username" net localgroup administratörer "type" /add The reason i have to use the Swedish word adminstratörer instead of administator is beause localgroup won't take the English translation as a group.

      – kagstrom2100
      Nov 14 '13 at 9:10













    • Just thought going through a .bat-file was a bit much when you could do this straight from VB.net. Like here. Lots of examples in Google too. So no need to create a .bat as middle-man. And with those examples you could feed the Unicode-name directly to the Windows-function. (Unless you need to run the .bat at a different time separate from your VB.net app for some reason?)

      – Rik
      Nov 14 '13 at 9:31













    • Well I have been looking for a way to do this in VB.net on Google for days, though I haven't found any way do do it. I already tried the example you linked and it didn't seem to work. How do I make sure that the .bat file doesn't use BOM? Also what is Lucida Console? The only info I could find about it is that it's a font. When I try the exact thing you did in the second example/image I get this i.imgur.com/6sh20j0.jpg

      – kagstrom2100
      Nov 14 '13 at 9:36











    • I added to my answer to include Lucida Console and file-creation without BOM (Edit #2, at the bottom). But does creating this user via net user work on the command-prompt? And what does not work if you create it via VB.net? For this we would need some example-code (or a separate question) because this should work. (BTW you linked my image, not yours, i think, in your comment)

      – Rik
      Nov 14 '13 at 10:41








    • 2





      @JohnLBevan Yeah, you're right. Apparently find doesn't handle UTF-8 input not too well. But you can use findstr. Like this: ping 127.0.0.1 -n 2 | findstr /C:" = "

      – Rik
      Apr 16 '15 at 19:01
















    9












    9








    9







    Edit: I was wrong ;)
    cmd.exe does accept UTF-8 but you need to be sure to save it without the BOM at the beginning of the file.



    Here is a second test. You can use chcp 65001 at the beginning of your batch-file.



    enter image description here





    A batch file can not be of type UTF-8. It needs to be ASCII. Cmd.exe just doesn't accept another format. I did a small test and you can use your characters but it needs some work.



    Make a file test.bat with echo Å Ä Ö. Save it with format ANSI/ASCII. Open a cmd.exe and make sure your cmd.exe uses Lucida Console (to display the Unicode characters).



    When you type the file it will show characters as the old DOS-characters. You can see a translation chart here.



    When you switch to a "Windows Ansi"-code page (i.e. West European Latin) with chcp 1252 the characters are displayed correctly. If they also get transferred to their respective utilities depends on that utility.



    But why are you creating a batch-file for this? Can't you just code it in VB.net?



    cmd.exe





    Edit 2#:



    This is how you set Lucida Console in cmd.exe:



    Lucida Console





    The BOM are 3 characters at the beginning of a UTF-8 file. (xEFxBBxBF).

    In VB.net you would create a file without a BOM like this:



    Dim utf8WithoutBom As New System.Text.UTF8Encoding(False)
    '^^^^^'
    Using sink As New StreamWriter("Foobar.txt", False, utf8WithoutBom)
    sink.WriteLine("...")
    End Using





    share|improve this answer















    Edit: I was wrong ;)
    cmd.exe does accept UTF-8 but you need to be sure to save it without the BOM at the beginning of the file.



    Here is a second test. You can use chcp 65001 at the beginning of your batch-file.



    enter image description here





    A batch file can not be of type UTF-8. It needs to be ASCII. Cmd.exe just doesn't accept another format. I did a small test and you can use your characters but it needs some work.



    Make a file test.bat with echo Å Ä Ö. Save it with format ANSI/ASCII. Open a cmd.exe and make sure your cmd.exe uses Lucida Console (to display the Unicode characters).



    When you type the file it will show characters as the old DOS-characters. You can see a translation chart here.



    When you switch to a "Windows Ansi"-code page (i.e. West European Latin) with chcp 1252 the characters are displayed correctly. If they also get transferred to their respective utilities depends on that utility.



    But why are you creating a batch-file for this? Can't you just code it in VB.net?



    cmd.exe





    Edit 2#:



    This is how you set Lucida Console in cmd.exe:



    Lucida Console





    The BOM are 3 characters at the beginning of a UTF-8 file. (xEFxBBxBF).

    In VB.net you would create a file without a BOM like this:



    Dim utf8WithoutBom As New System.Text.UTF8Encoding(False)
    '^^^^^'
    Using sink As New StreamWriter("Foobar.txt", False, utf8WithoutBom)
    sink.WriteLine("...")
    End Using






    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Nov 14 '13 at 10:38

























    answered Nov 13 '13 at 15:06









    RikRik

    11k12133




    11k12133













    • Hi and thanx for the answer. In my vb.net application I'm trying to create a .bat file with the commands: net user "username" net localgroup administratörer "type" /add The reason i have to use the Swedish word adminstratörer instead of administator is beause localgroup won't take the English translation as a group.

      – kagstrom2100
      Nov 14 '13 at 9:10













    • Just thought going through a .bat-file was a bit much when you could do this straight from VB.net. Like here. Lots of examples in Google too. So no need to create a .bat as middle-man. And with those examples you could feed the Unicode-name directly to the Windows-function. (Unless you need to run the .bat at a different time separate from your VB.net app for some reason?)

      – Rik
      Nov 14 '13 at 9:31













    • Well I have been looking for a way to do this in VB.net on Google for days, though I haven't found any way do do it. I already tried the example you linked and it didn't seem to work. How do I make sure that the .bat file doesn't use BOM? Also what is Lucida Console? The only info I could find about it is that it's a font. When I try the exact thing you did in the second example/image I get this i.imgur.com/6sh20j0.jpg

      – kagstrom2100
      Nov 14 '13 at 9:36











    • I added to my answer to include Lucida Console and file-creation without BOM (Edit #2, at the bottom). But does creating this user via net user work on the command-prompt? And what does not work if you create it via VB.net? For this we would need some example-code (or a separate question) because this should work. (BTW you linked my image, not yours, i think, in your comment)

      – Rik
      Nov 14 '13 at 10:41








    • 2





      @JohnLBevan Yeah, you're right. Apparently find doesn't handle UTF-8 input not too well. But you can use findstr. Like this: ping 127.0.0.1 -n 2 | findstr /C:" = "

      – Rik
      Apr 16 '15 at 19:01





















    • Hi and thanx for the answer. In my vb.net application I'm trying to create a .bat file with the commands: net user "username" net localgroup administratörer "type" /add The reason i have to use the Swedish word adminstratörer instead of administator is beause localgroup won't take the English translation as a group.

      – kagstrom2100
      Nov 14 '13 at 9:10













    • Just thought going through a .bat-file was a bit much when you could do this straight from VB.net. Like here. Lots of examples in Google too. So no need to create a .bat as middle-man. And with those examples you could feed the Unicode-name directly to the Windows-function. (Unless you need to run the .bat at a different time separate from your VB.net app for some reason?)

      – Rik
      Nov 14 '13 at 9:31













    • Well I have been looking for a way to do this in VB.net on Google for days, though I haven't found any way do do it. I already tried the example you linked and it didn't seem to work. How do I make sure that the .bat file doesn't use BOM? Also what is Lucida Console? The only info I could find about it is that it's a font. When I try the exact thing you did in the second example/image I get this i.imgur.com/6sh20j0.jpg

      – kagstrom2100
      Nov 14 '13 at 9:36











    • I added to my answer to include Lucida Console and file-creation without BOM (Edit #2, at the bottom). But does creating this user via net user work on the command-prompt? And what does not work if you create it via VB.net? For this we would need some example-code (or a separate question) because this should work. (BTW you linked my image, not yours, i think, in your comment)

      – Rik
      Nov 14 '13 at 10:41








    • 2





      @JohnLBevan Yeah, you're right. Apparently find doesn't handle UTF-8 input not too well. But you can use findstr. Like this: ping 127.0.0.1 -n 2 | findstr /C:" = "

      – Rik
      Apr 16 '15 at 19:01



















    Hi and thanx for the answer. In my vb.net application I'm trying to create a .bat file with the commands: net user "username" net localgroup administratörer "type" /add The reason i have to use the Swedish word adminstratörer instead of administator is beause localgroup won't take the English translation as a group.

    – kagstrom2100
    Nov 14 '13 at 9:10







    Hi and thanx for the answer. In my vb.net application I'm trying to create a .bat file with the commands: net user "username" net localgroup administratörer "type" /add The reason i have to use the Swedish word adminstratörer instead of administator is beause localgroup won't take the English translation as a group.

    – kagstrom2100
    Nov 14 '13 at 9:10















    Just thought going through a .bat-file was a bit much when you could do this straight from VB.net. Like here. Lots of examples in Google too. So no need to create a .bat as middle-man. And with those examples you could feed the Unicode-name directly to the Windows-function. (Unless you need to run the .bat at a different time separate from your VB.net app for some reason?)

    – Rik
    Nov 14 '13 at 9:31







    Just thought going through a .bat-file was a bit much when you could do this straight from VB.net. Like here. Lots of examples in Google too. So no need to create a .bat as middle-man. And with those examples you could feed the Unicode-name directly to the Windows-function. (Unless you need to run the .bat at a different time separate from your VB.net app for some reason?)

    – Rik
    Nov 14 '13 at 9:31















    Well I have been looking for a way to do this in VB.net on Google for days, though I haven't found any way do do it. I already tried the example you linked and it didn't seem to work. How do I make sure that the .bat file doesn't use BOM? Also what is Lucida Console? The only info I could find about it is that it's a font. When I try the exact thing you did in the second example/image I get this i.imgur.com/6sh20j0.jpg

    – kagstrom2100
    Nov 14 '13 at 9:36





    Well I have been looking for a way to do this in VB.net on Google for days, though I haven't found any way do do it. I already tried the example you linked and it didn't seem to work. How do I make sure that the .bat file doesn't use BOM? Also what is Lucida Console? The only info I could find about it is that it's a font. When I try the exact thing you did in the second example/image I get this i.imgur.com/6sh20j0.jpg

    – kagstrom2100
    Nov 14 '13 at 9:36













    I added to my answer to include Lucida Console and file-creation without BOM (Edit #2, at the bottom). But does creating this user via net user work on the command-prompt? And what does not work if you create it via VB.net? For this we would need some example-code (or a separate question) because this should work. (BTW you linked my image, not yours, i think, in your comment)

    – Rik
    Nov 14 '13 at 10:41







    I added to my answer to include Lucida Console and file-creation without BOM (Edit #2, at the bottom). But does creating this user via net user work on the command-prompt? And what does not work if you create it via VB.net? For this we would need some example-code (or a separate question) because this should work. (BTW you linked my image, not yours, i think, in your comment)

    – Rik
    Nov 14 '13 at 10:41






    2




    2





    @JohnLBevan Yeah, you're right. Apparently find doesn't handle UTF-8 input not too well. But you can use findstr. Like this: ping 127.0.0.1 -n 2 | findstr /C:" = "

    – Rik
    Apr 16 '15 at 19:01







    @JohnLBevan Yeah, you're right. Apparently find doesn't handle UTF-8 input not too well. But you can use findstr. Like this: ping 127.0.0.1 -n 2 | findstr /C:" = "

    – Rik
    Apr 16 '15 at 19:01















    2














    The thing that fixed this for me was to save the file as UTF-8 without BOM and using this code



    @echo off
    chcp 65001
    net user Linus /add
    net localgroup Administratörer Test/add


    The thing I didn't use before was @echo off so that and using chcp 65001 is what fixed it! Thanx too Rik for all the help :)






    share|improve this answer




























      2














      The thing that fixed this for me was to save the file as UTF-8 without BOM and using this code



      @echo off
      chcp 65001
      net user Linus /add
      net localgroup Administratörer Test/add


      The thing I didn't use before was @echo off so that and using chcp 65001 is what fixed it! Thanx too Rik for all the help :)






      share|improve this answer


























        2












        2








        2







        The thing that fixed this for me was to save the file as UTF-8 without BOM and using this code



        @echo off
        chcp 65001
        net user Linus /add
        net localgroup Administratörer Test/add


        The thing I didn't use before was @echo off so that and using chcp 65001 is what fixed it! Thanx too Rik for all the help :)






        share|improve this answer













        The thing that fixed this for me was to save the file as UTF-8 without BOM and using this code



        @echo off
        chcp 65001
        net user Linus /add
        net localgroup Administratörer Test/add


        The thing I didn't use before was @echo off so that and using chcp 65001 is what fixed it! Thanx too Rik for all the help :)







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 15 '13 at 9:31









        kagstrom2100kagstrom2100

        78116




        78116






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Super User!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f675369%2fwhat-encoding-to-get-%25c3%2585-%25c3%2584-%25c3%2596-to-work%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Plaza Victoria

            Puebla de Zaragoza

            Musa