Visual Studio 2012 strange characters at beginning of file - eclipse

Whenever i copy a file made in VS2012 over to Eclipse, and open the file in Eclipse doc viewer there always seem to be some extra characters at the beginning (pic below). They arent visible in VS2012, or if I open the file in Notepad. What character is that being put there, and how can i get it to stop? Below is a pic of a JS file I made i VS, and how it appears in Eclipse

Thats a UTF8 BOM, Ive heard thgis works well for windows
http://www.bryntyounce.com/filebomdetector.htm
If you have access to linux you can use awk to remove

Related

VIsual Studio Code Plain Text Files

I have been searching for over 30 minutes but can't find the solution. On my Windows installation of VSCode when I create a new file (default to Plain Text as expected) and I go to save, it defaults to saving with a .txt extension. On my Mac though it defaults to All Files. I have searched through settings and I don't recall changing anything on my Windows machine but I WANT to save new files that are Plain Text with .txt by default on Mac. What am I missing?

NetBeans 11 and Encoding characters

Now I download Apache NetBeans 11 and after that, I CLONE my Git PHP Repository to Windows Folder, If I open HTML files via Notepad, everything is ok, but when I open it via NetBeans, I got wrong characters interpretation like this:
BAD
Ăšvod
RIGHT
Úvod
How can I solve it to use UTF8? When I open a file in example via PSPad Editor I see the encoding is UTF8, but the format is UNIX, not DOS, maybe this cause a problem
Edit:
When I use Netbeans 8.2 Characters are ok
Any sugestions?

How to prevent vscode as default program to run html file?

When I double click a html file, it will be automatically opened in vscode. I set Firefox as default program and it works fine, but every time after I reboot, Visual Stadio Code - URL Handler still be the default program to open a html file.
I use linux mint 18.3, it only happens after vscode upgrade to 1.28
Right click on the file in the chosen format and choose Open With... -> Other Application or Open With Other Application.
Don't forget to check the Remember this application for "..." files checkbox to apply your selection for all files of the same format.
As discussed here

External editor for IPython notebook

I am using IPython notebook and I want to edit programs in an external editor.
How do I get the %edit file_name.py to open an editor such as Notepad++.
Running %edit? will give you the help for the %edit magic function.
You need to set c.TerminalInteractiveShell.editor, which is in your ipython_config.py. I'm not quite sure where this is located in Windows; on OS X and Linux, it is in ~/.ipython. You'll want to set the variable to be the full path of the editor you want.
Alternatively, you can create an environment variable EDITOR in Windows itself, and set that equal to the full path of the editor you want. iPython should use that.
I'm using Windows 7 and 8 (and 10TP) and Python 3.4.2.
I started with ipython locate to tell me where ipython thought config files suggested elsewhere should be. When I saw it was different I read around and came up with the following:
On my system, the ipython locate gave me c:\users\osmith\.ipython, not the _ipython you'll see mentioned in the YouTube videos done with Windows XP,
Look in the directory ipython locate specifies for a profile directory; if you aren't actively doing anything with ipython profiles, it should be .ipython\profile_default, if you are using profiles, then I leave it to you to s/profile_default/${YOUR_PROFILE_NAME}/g
Check the profile_default directory for a ipython_config.py file, if it's not there, tell IPython to initialize itself: ipython profile create
Open the config file in a text editor,
If you are the kind of person who hasn't messed around with their console overly much and installs things in standard places, you can skip straight to this step by typing: ipython profile create followed by start notepad .ipython\profile_default\ipython_config.py.
Search for the string c.TerminalInteractiveShell.editor,
The comment above this indicates you can also use the EDITOR environment variable, but hard coding file paths never hurt anyone so lets do eet:
Copy the line and remove the leading hash and spaces from the copy.
Replace the text between the apostrophes ('notepad') with the path of our desired editor, e.g.
c.TerminalInteractiveShell.editor = 'c:/program files (x86)/noddyeditor/noddy.exe'
There is a catch here, though; some modern editors get a bit fancy and automatically and, when invoked like this, detach from the console. Notepad++ and Sublime Text, for example. Sublime accepts a "--wait" option, which works some of the time; this tells the command invocation to hang around until you close the file, for some definition of until and some other definition of close.
However, the following setting will work most of the time for sublime text:
c.TerminalInteractiveShell.editor = '"c:/program files/sublime text 3/subl.exe" --wait'
(assuming c:\program files\ is where your sublime text 3 directory is)
Try the 'Pycharm' editor
This works for me.

How to make sure that the scripts I package in my War files are in Unix text format?

Last day I wrote a script so that my J2ee app could do backups. After deployment, the script was not working. I was wondering why, so I copied it from the deployment directory to my home dir. It was not even executing the first echo. That was strange because I tested the script on the very same machine. Later, after another SO question, I discovered that passing it through dos2unix would solve the problem. What happened was that I wrote the script on Linux, I did a simple copy and paste on Eclipse (running on windows), then I deployed the application (and the script was with /n/r the windows way).
How can I avoid this? I mean, I should write the script on Linux and not touch it at all (I'd like to have other options), or is there some special setting I could use?
You can set Eclipse to use Unix line-endings. http://www.sics.se/node/2108
Navigate to the Workspace preferences
(General:Workspace) Change the Text
File Encoding to UTF-8 Change the New
Text File Line Delimiter to Other and
choose Unix from the pick-list Note:
to convert the line endings of an
existing file, open the file in
Eclipse and choose File : Convert Line
Delimiters to : Unix