K
K
ksistos2012-01-11 10:06:08
Unicode
ksistos, 2012-01-11 10:06:08

UTF-8 in Visual Studio 2008

How to make the studio save the source in UTF-8 by default?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Piskov, 2012-01-11
@Piskov

foreach (var f in new DirectoryInfo(@"...").GetFiles("*.cs", SearchOption.AllDirectories))
{
  string s = File.ReadAllText(f.FullName);
  File.WriteAllText(f.FullName, s, Encoding.UTF8);
}
Just think about whether you really need it and why utf-16 does not suit you (the same rc compiler does not support the eight, but supports 16)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question