[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Enforcing UTF-8 Coding

From: David Weintraub <qazwart_at_gmail.com>
Date: Tue, 16 Dec 2008 16:08:42 -0500

I've been given the order to make sure all of our files are encoded in
UTF-8. There are several problems: First of all, we use Eclipse on
Windows as our development platform, and the default in that
application is to use the Windows code page, and setting that is up to
the user.

I could try compiling Java with the --encoding parameter. In Java 1.6,
the compile will fail when it hits a character that isn't property
encoded. Actually, it fails when it finds a character it doesn't
understand how it is encoded. The encoding could be wrong, so it is
set to the wrong charater, but there's no way for the compiler to know
that.

Now comes the question of our HTML, CSS, XML, JavaScript, and XSL
files. Since the compiler doesn't run through these, how can I ensure
that these are property encoded too?

If I had a way of checking the encoding of files, I could write a
pre-commit hook to fail the build if the encoding on a file is wrong,
but how do I do this?

--
David Weintraub
qazwart_at_gmail.com
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=985227
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2008-12-16 22:09:41 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.