Community
Participate
Working Groups
OS: OS X 10.4.2 Tiger JVM: 1.5.0_02 Eclipse: 3.1 Selecting a file in the Mac OS X Finder and copying (cmd-c), returning to Eclipse and pasting into a method that defines a file path will result in question marks appearing in filename when file.getName() called eg: ???somefile.txt', appears to be an encoding issue. OS-X Tiger uses UTF-16 See: http://discussions.info.apple.com/webx?14@536.vbzpayFB6mc.1@.68b6d7c8
>and pasting into a method that defines a file path Can you explain a bit more? Excapt steps would be good, e.g. where exactly do you see the question marks. See also: http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-text-home/development/bug-incomplete.htm
(In reply to comment #1) > >and pasting into a method that defines a file path > Can you explain a bit more? Excapt steps would be good, e.g. where exactly do > you see the question marks. > > See also: > http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-text-home/development/bug- incomplete.htm Sorry, to simplify: Step 1: In the Finder select/highlight a file, say 'whoops.txt', then copy the file to the pasteboard (cmd-c) Step 2: Back in Eclipse create the following code: System.out.println("whoops.txt?"); // Paste in from the clipboard Step 3: Execute, what I get is something like in the console: ??whoops.txt Deleting and retyping 'whoops.txt' outputs 'whoops.txt' without any problems
step 2: I assume you paste between "<caret>", right? Where does the '?' come from at the end? step 3: with execute youe mean you have a Java class with a main(...) that contains the println, correct? How do you start the class? What is the encoding of that Java file in Eclipse?
Created attachment 26197 [details] Simple class that outputs text
The pasted text is correct i.e. looks good in the editor and when you run the code it is wrongly displayed in the Console, right? If that's the case then you have to set the encoding on the 'Common' tab of your launch configuration.
Get rid of deprecated state.
.