We use netbeans that uses ant to build projects: build.xml includes
build-impl.xml that reads projects.properties and there are
source.encoding=UTF-8 or source.encoding=windows-1251.
Software consists of multiple projects (modules, libraries, core, etc).
Structure of workspace after all checkouts is done is like so:
core/corelib1 (project with utf-8 sources)
core/corelib2 (project with utf-8 sources)
core/kernel (legacy project with cp1251 sources)
product/module1 (legacy project with cp1251 sources)
product/module2 (project with utf-8 sources)
product/build.xml (this simply refers to build.xml in all other projects to
Each project have all files in one encoding only but different projects are in
As i can see trying to detect encoding from individual project settings would be
very hard. And there are other IDE's and handwritten build.xml's that use
different scheme. Simple path pattern to encoding would be simpliest but still
working solution. Flexibility can be added with settings for default encoding
and path patterns where encoding differs (so one have not to specify path
pattern/encoding for every project in workspace). Or somethig like that.