Eclipse problem with symbol § - windows

I'm using Eclipse for programming. In one method of my project i used the String "§". I use a svn repository. If i edit the file with Ubuntu OS the § symbol isnt displayed correctly in the eclipse editor and also in my programm, if I edited it before on Windows. The same is vice versa.
Any hints how to solve this problem? I don't want to always change the symbol manually if I comitted a new version from another OS

Check the "Text file encoding" of your sources.
(Preferences / General / Workspace)
I would recommend in your case UTF-8.
You can also set the default type in Preferences / General / Content Type / Text / Java source file
alt text http://img401.imageshack.us/img401/4341/eclipseencoding.png

Related

Gradle / Netbeans - Howto set encoding to UTF-8 in Editor and Compiler

I created a Gradle-Project in Netbeans and tranfered some existing UTF-8-encoded sourcefiles to it (simply by file copying them to the project folder)
The problem: Netbeans Editor and the Gradle-builded jars using a wrong character encoding (Win1252, my system encoding) to display (Netbeans) and compile (Gradle) the files.
How can I avoid that and configure NB/Gradle to use UTF-8?
Solution:
I had to set encoding used in Netbeans globally to UTF-8.
Added in netbeans.conf "-J-Dfile.encoding=UTF-8" to parameter "netbeans_default_options". That's all.
There is no known way to set used encoding just for the gradle-project.
Using "Encoding Support" plugin from NetBeans Plugin Portal, it is possible to set encoding individually for each file. I have no idea where this setting is saved for the file.
Procedure: When file is opened, a message box may open to notify about wrong encoding. Agree to continue then change encoding on bottom right corner of IDE. File reloads automatically. One needs to repeat procedure for each file in the project and that is annoying.
Used on Apache NetBeans 12.0, plugin 1.7.0, Gradle project type.

How to refresh Sublime Text 3 workspace color schemes?

When you save a project, Sublime Text will create a .sublime-workspace file. In this file, there is an array of buffers, and for each buffer there is a color_scheme property. This is set to whatever color scheme was chosen when the buffers and workspace were created.
I recently changed my theme and color scheme in my user settings file. How can I refresh all of my project's workspaces so that way it uses my new color_scheme provided in my user preference file without needed to edit each project's workspace file one-by-one?
Expanding on the answer given by Tot you can do this for all views in all windows that are open by using a nested list comprehension (remember this is Python so we can be pretty flexible):
[ v.settings().erase("color_scheme") for views in [ w.views() for w in sublime.windows() ] for v in views ]
This way you don't have to run the command in each tab individually.
The only way I found to reset tabs to user's chosen color scheme is to enter this in the console :
view.settings().erase("color_scheme")
This will reset the color scheme of the selected tab - unfortunately you'll have to do it for each tab. But it's still quicker than closing and reopening the tab.
I only have this issue with Sublime Text 3 on Mac OS X.
Source : https://www.sublimetext.com/forum/viewtopic.php?f=3&t=19310
P.S. : If you've just updated your color scheme file, you'll sometimes have to execute this command twice. Just type the up arrow in the console to write the last command again.
Windows 10 AppData-related Solution
Please make sure that you are in a similar situation as me before trying this solution (see below). Steps:
Note the language and package that the Error loading colour scheme reports (my case was: markdown and MarkdownEditing).
Go to your AppData directory (type %AppData% in file explorer address bar).
Open directory Sublime Text 3, or whatever your version is.
Open the .sublime-settings file that matches the language from step 1.
Remove any lines that refer to the package you noted from step 1.
Remember that this file should be a properly formatted JSON file when you remove lines manually. Save this file and restart Sublime Text.
Background
I've decided to post here in case some of the python script solutions didn't work for you and your situation is similar to mine. I'm using GitHub to sync my Sublime Text AppData (Windows 10), in order to keep my workflow settings the same on multiple machines. Recently, I noticed that when I uninstalled a certain package on one of my machines, I accidentally merged some configuration files for that non-existent package on my other machine. This resulted in a persistent Error loading colour scheme, in particular for me when changing syntax to markdown (the package was MarkdownEditing for reference).

Can I use Xcode as an IDE for Perl scripts?

I am using OS X 10.9 (Mavericks) and need to work on a Perl project. I enjoy using TextMate, Atom, and BBEdit, but would like to try using Xcode instead, as it has good integration with git, a clean look, and I am already intimately familiar with the UI and syntax highlighting colour scheme.
Is it possible to use Xcode as an IDE to develop and run Perl scripts, in a way that puts it on par, or ahead of, existing text editors?
Update
I used Xcode 5 as an IDE for Perl for more than a month, and found it an excellent alternative to regular text editors like Atom and TextMate. However, like pure text editors, Xcode lacks support for debugging in Perl. I have since discovered Komodo IDE, a really nice IDE for Perl (and similar languages) that supports graphical Perl debugging, plus remote Perl debugging. I have since switched from using Xcode for Perl development to using Komodo IDE.
After some experimentation, it seems that Xcode makes for a fairly decent environment for developing Perl. Here is a screenshot of Xcode showing some Perl, project navigator, Git integration, and command-line output from a Perl script, as run by Xcode.
Xcode 5's built-in syntax highlighting works fine with Perl (.pl and .pm) files, right out of the box. But to use Xcode to write Perl more efficiently, you'll want to set up a new Xcode project:
Create a new Xcode workspace (File > New > Workspace) and select the folder you want to use for the Perl project.
Enable the Xcode navigator, so you can see the files in your project (View > Navigators > Show Navigators). Notice that Xcode does not show you a list of files in the workspace folder by default. If you're reading this, you're probably already an Xcode user, already knew that.
Manually add any files, or folders (groups, in Xcode parlance), that you want to see in the project (right-click on the Project Navigator pane and select Add files to "Project Name). Create groups to mirror your folder structure and add any files in subfolders to the groups. This can be a bit of work, depending on the size of your Perl project, but once you're set up it should not change much.
Click on your files in the Project Navigator to view the code. If you are using a Git or Subversion, Xcode will generate diffs as normal in the Xcode version editor.
To get your Perl script running when you hit Cmd-R:
Create a new scheme (Product > Scheme > New Scheme), configure Target to None and assign a name like Run Perl.
After creating the scheme, hit Edit Scheme.
In the Run perl scheme, set the Executable to /usr/bin/perl (select Other then press Shift-Cmd-G, enter /usr/bin/perl, and press Choose).
Go to the Arguments tab and ensure that your main script is the first argument. Add more arguments and environment variables as necessary.
Go to the Options tab and set Use custom working directory to your project folder. Deselect XPC services and any other options related to iOS or OS X development.
Press OK and when you press Cmd-R in Xcode, Xcode will call Perl, run your script, and show you the output.
To get Perl snippets and templates in Xcode, see How to create project templates in Xcode 4.
Extra tips:
If you are working with files that have extensions for an language that Xcode does not recognise, such as .sql files, you may be able to use the generic syntax highlighting. Go to Editor > Syntax Highlighting > Generic.

Set encoding in aptana 3

I have just downloaded Aptana 3.2.2 (standalone version) for the latest Mac OS X. I cannot find out how to set the encoding (preferable UTF-8) for my specific html-document. In Aptana 2 and in Visual Studio this is an easy catch, but I have now scanned all the menues in Aptana 3.2.2 without success.
Assuming that version for linux is similar as for Mac OS X, try right click on the specific file in the App Explorer and then go Properties (or try Alt + Enter while you edit file you want to change encoding). On the bottom of tab Resources you have "Text file encoding" where you can adjust this setting.
Also if you want to set encoding for whole project go Project -> Properties from the top menu which will let you change it for a bunch of files.

Changing source files encoding in XCode 4

We are developing primarily in C++ under Windows and write comments in Russian. So our OEM encoding is Cyrillic (Windows).
XCode 4 does not ask to specify file encoding when you add existing file to the project. And you can specify your encoding in the right pannel on per file basis.
How am I supposed to change encoding for more than 200 files?
Thank you.
Select the files (one or more) in the Project Navigator. In the Utility pane, under the Text Settings group you can change the Text Encoding.
Click the file in the Project Navigator, then open the Utility pane. Choose the File Inspector tab and look under the Text Settings group to find the Text Encoding popup.

Resources