Name
Name

Reputation: 3550

Tool to convert code source from a codepage to UTF-8?

I'm working on an open source project. The original project contains comments in russian and is using codepage 1251. I'm using codepage 1252 and the russian comments aren't displayed correctly in Visual Studio Express 2008, not nice but anyway I can't read russian. Someone using codepage 950 (traditional chinese) tried to compile the project and was unable to do it, because of the code page! Now it is really annoying.

I think that using unicode (and more exactly UTF-8 with signature) as file format for the code source is the way to go.

Problem: how to convert the whole source code easily?

I have already though about:

Does anyone know another tool (a command line tool would be perfect) to convert from a codepage to UTF-8?

Edit: As suggest by tkotitan seems iconv to be the solution I was looking for. There is a windows version of iconv. And now that I know the name of this tool, I was able to find over posts on stackoverflow dealing with analogous issues.

Upvotes: 4

Views: 5114

Answers (2)

LicenseQ
LicenseQ

Reputation: 1801

You can ask VS 2008 to open file with encoding (click Arrow near Open button in open dialog)

Or you can change regional settings to add russian region as default ;)

Upvotes: 2

tkotitan
tkotitan

Reputation: 3009

In a unix world the utility is called iconv.

Not sure if there is a windows equivalent.

Upvotes: 7

Related Questions