Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

is there a way to set Windows 7 to globally use UTF-8 as standard?
its really annoying to set every single text editor to use it.

share|improve this question
2  
So you want to tell the OS something .. and then magically all editors pick that up? :) How many editors do you use? Every 3 minutes another one? Anyway: superuser.com/questions/221593/windows-7-utf-8-and-unicode From what I know: Windows uses UTF16 internally everywhere, and I doubt that you can change that. –  akira Jan 31 '11 at 7:09
    
editors i use: notepad, notepad++, qt, eclipse, thunderbird, open office, and some others... i am not just talking about plain text editors but everything that works with text in and output. most of the platform independent text editors use utf-8 as standard in Linux but use Latin-1 in Windows. –  Baarn Feb 1 '11 at 15:36

2 Answers 2

up vote 25 down vote accepted

The short answer is no, it is not possible.

To elaborate, I am afraid you won't find a global encoding option in Windows 7 that lets you both 1) set a global default which 2) all the application you listed would obey.

Also, I would also like to ask that what is the problem here that you are trying to solve?

It is up to application to choose whether they use unicode internally to represent data. While use of unicode is encouraged, you may never be sure that all your applications in fact do internally support it.

What you can do, however is to change the default character encoding for each of the listed applications:

  • For Eclipse, default encoding for new files can be set from Windows > Preferences > General > Content Types (see post on Eclipse Community Forms)
  • For Notepad++, navigate to Settings > Preferences > New Document/Default/Directory and set Encoding to UTF-8
  • As of Thunderbird, I am pretty sure it already uses UTF-8 as default encoding? (see these notes about character encoding)
  • In the case of OpenOffice (and LibreOffice), you actually don't even need to care about encoding, since documents saved by OpenOffice are based on XML, in which encoding is specified internally in the XML-files (and UTF-8 is already the default there as well)
  • From UTF-8 point-of-view, PowerShell is tricky. It has default encoding of UTF-16LE.
    • For outputting files from PowerShell to UTF-8, see this answer
    • For changing default encoding see this answer
share|improve this answer
1  
not the answer i was hoping to get but i think i have to live with the truth, thank you =) –  Baarn Feb 2 '11 at 21:33

It's not possible mainly because Windows does not allow UTF-8 as the system ANSI codepage even though it does have an ANSI codepage for UTF-8, codepage 65001. There seem to be several reasons for this:

  • When Unicode was new Microsoft decided UCS-2 would be the best way to support Unicode. At that time Unicode was 16-bit.
  • Windows has one ANSI codepage for each supported language, unlike Unix and Linux where the language and encoding can be set independently.
  • Code page 65001 doesn't work everywhere. Specifically it is broken with some of the MultiByte support in Windows which expect multibyte characters to require one or two bytes whereas UTF-8 requires between one and four bytes. The WriteFile() API for instance returns an incorrect result under codepage 65001 which bubbles up through all library code relying on it such as write().

Microsoft's own Michael Kaplan has a blog, "Sorting it all Out", with several posts on related topics. He may even publish a post on topics you email him directly about.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.