Community
Participate
Working Groups
site's "build all" seems not using project encoding, my plugin project is in UTF8 encoding, and can build successfully, but fails when using site project's "build all", which give a error on where a unicode character appears.
when a build fails, there is typically a log in the site project. Please attach it. the plugin build process has nothing to do with project encoding.
in the log file: [code]ERROR in xxx.java (at line 35) special.add(new Character('�')); ^^^^ Invalid character constant[/code] the project's encoding has been set to UTF8, and there are Chinese characters in java file. Maybe the site builder didn't use the project encoding and use the default encoding of platform.
Olivier, given that PDE does not set/touch the encoding one way or another during the build, would you happen to have some insight into why the file compiles fine in one context (in the workspace) and not in another (via the Ant build script)?
you know, javac has an option -encoding, you should set it.
Moving back to pde/build as they generate the content of the build.xml, which currently does not include the 'encoding' attribute. However, as long as pde/build is workspace-agnostic, I don't foresee an easy solution since each plugin project can have its own special encoding. Therefore, no one-size-fits-all encoding value that pde/ui can set on the ant launch config will be good enough.
If I'm correct the compiler can't guess the encoding (Olivier?), and PDE build does not have the info since it is workspace unaware. Unless my first assertion is false, I can't see what we can do?
When PDE/UI generates the build script, could it retrieve the encoding of the project? If no encoding is specified, the compiler is using the platform encoding.
Given that encodings can be specific to a project, a folder, or a file, there is no solution that will cover 100% of the case. Even if PDE UI was able to give us a list of encodings per folder in each projects , problems would still occur when building in a releng style mode.
i think site build should just invoke the sub feature build, and feature build just invoke the sub plugin build when compiling the source. because each build work well in its own scope.
*** Bug 92372 has been marked as a duplicate of this bug. ***
pde.build will set the javac task's encoding according to the property javacDefaultEncoding.<libraryname> from the plugin's build.properties. ex: javacDefaultEncoding..=ISO-8859-1 It will also set per file & per folder encodings according to the javacCustomEncodings.<libraryname> property. ex: javacCustomEncodings.library.jar=src1[US-ASCII],\ src2/foo.java[Cp1252] we would want pde.ui to write at least the default encoding property. Getting the list of folders/files with custom encodings can be expensive without knowing the implementation of the preference store.
*** Bug 155931 has been marked as a duplicate of this bug. ***
Hi all, Is there any plan to try to fix this bug or, at least, could someone please try to explain me the reason why PDE build can't retrieve encoding settings defined in .settings/org.eclipse.core.resources.prefs ? I've tried to understand where the real problem stands reading this bug and its duplicates' comments but I'm not sure it's very clear to me ... :)
*** Bug 232241 has been marked as a duplicate of this bug. ***
Well, in fact, it's a dupe of bug 155015, because it's a problem much more general than just update sites.
*** This bug has been marked as a duplicate of bug 155015 ***