Community
Participate
Working Groups
3.6 RC4. The '-encoding' entry for jdt_api_compile.htm needs clarification: - how are custom encodings separated? - the example says: X.java[utf8] - does that mean all X.java in all packages have UTF-8? - how does one qualify (path or package name)? - "If multiple encodings are specified, the last one will be used." ==> should be last sentence
Moving to JDT/Doc
Created attachment 170543 [details] Proposed fix Does this improve the documentation ?
Released for 3.6RC4.
I still don't see how they should be separated (space, comma, semicolon?). I would provide an example with two files and one with a path so that it's already clear when just looking at the example.
>If multiple default source file encodings are specified, the last one will be >used. This is not 100% clear whether this is meant per "-encoding" or per each file.
(In reply to comment #5) > >If multiple default source file encodings are specified, the last one will be >used. > This is not 100% clear whether this is meant per "-encoding" or per each file. The default encoding is the one specified using -encoding. I'll try to improve it one last time.
>The default encoding is the one specified using -encoding. Sure, but what's not clear is what you want to say with the sentence. Let's look at this example: -encoding X.java[utf8] ascii X.java[utf16] cp1252 What is the encoding of X.java now? And in this case: -encoding X.java[utf8] ascii -encoding X.java[utf16] cp1252 ?
(In reply to comment #7) > >The default encoding is the one specified using -encoding. > Sure, but what's not clear is what you want to say with the sentence. Let's > look at this example: > -encoding X.java[utf8] ascii X.java[utf16] cp1252 This is an illegal syntax. -encoding cp1252 -encoding ascii X.java[utf8] Y.java[utf16] This is the right syntax. This means all source files are read with cp1252 encoding except X.java that will use utf8 and Y.java that will use utf16. > What is the encoding of X.java now? If you specify twice X.java on the command line you will get an error. > And in this case: > -encoding X.java[utf8] ascii -encoding X.java[utf16] cp1252 ? Same thing. Invalid syntax
Created attachment 170802 [details] Complement with examples Complements released in HEAD.
If ok, I'll close as FIXED.
>-encoding cp1252 -encoding ascii X.java[utf8] Y.java[utf16] > >This is the right syntax. This means all source files are read with cp1252 >encoding except X.java that will use utf8 and Y.java that will use utf16. Now I am really confused: The doc say: "If multiple encodings are specified, the last one will be used." So, isn't 'ascii' specified after 'cp1252'? And what happens if paths are there too, e.g. -encoding cp1252 /foo/bar/X.java[utf8] /foo/bar[utf16]
(In reply to comment #11) > >-encoding cp1252 -encoding ascii X.java[utf8] Y.java[utf16] > > > >This is the right syntax. This means all source files are read with cp1252 > >encoding except X.java that will use utf8 and Y.java that will use utf16. > Now I am really confused: The doc say: > "If multiple encodings are specified, the last one will be used." > > So, isn't 'ascii' specified after 'cp1252'? yes, right. ascii wins in this case. > And what happens if paths are there too, e.g. > -encoding cp1252 /foo/bar/X.java[utf8] /foo/bar[utf16] Doesn't change anything. All units in /foo/bar will be read using utf16 except X.java that will use utf8. In this case the last one doesn't mean as this is a specific encoding and not a default encoding.
Created attachment 170805 [details] Adding another example
Looks good now!
Thanks. Closing as FIXED.
Verified in I20100603-0100.