Why do Eclipse and Netbeans spoil accentuated files?

Asked

Viewed 368 times

0

Look, I tried and I tried, I looked on the web for some way to learn how to use these tools, but I’m giving up, I’m going to use Notepad++ anyway. Before I used to use the Dreanweaver and never had this problem.

Always use UTF-8 in both file creation and html

Just for the record Notepad++ does not "spoil" the file.

I’ve always worked with UTF-8 in dreanweaver I want to use Netbeans or Eclipse, but it’s impossible.

  • 2

    Most likely why you didn’t set the correct encoding when creating the project.

  • It is likely that your files were created with ANSI, ISO-8859 or some other encoding and the standard of Workspace(eclipse) is as utf-8, it is possible to change this configuration.

  • Edit the question and ask what is the 'broken' file encoding and the eclipse default match.

  • Worse than I’ve ever done all the test and change that netbeans allows, I create and save the file as UTF8 which is what I’ve always used in Dreanweaver, but all of a sudden it just changes the accented characters to unreadable codes... just by itself...

  • This problem always happens with files already created or new?

  • If I create a file, I work with it in a good... then I open another file to work... beauty... when I go back to the previous file, there it is all "screwed up", I mean whatever, it can be new or existing.

  • Maybe it’s not netbeans, it can be your php as it connects in the database, read this: http://answall.com/a/43205/3635 (read the part about header, PDO and Mysqli).

  • It is not time to display in the browser, it changes the file physically even... it changes the accents for machine characters I will put here let’s see if the editor lets look <html dir="Ltr"><head> <title>Pãâ¡gina</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-Scale=1.0"> </head> <body contentable="true"> <div>TODO write content</div> </body><</html>

  • 1

    I think there is a bug in the Netbeans HTML editor, when I view the page and go back to the code it detonates the file see: Pãːæ'Æ’ê‡gina

Show 4 more comments

1 answer

1


Well, try removing the "broken" characters and save the document. I had this problem in files with different encoding than the default Netbeans.

Another recommendation is to inform the site (both in part HTML so much in the PHP) the encoding used, in which the browser can perform the correct conversions when displaying the texts if you have problems with accentuation in the site view.

EDIT

You can find your answer in this topic here, which a member posted the solution.

  • So Gabriel, I added the parameter according to the hint in the topic you suggested and it really stopped cluttering, but the netbeans html editor insists on changing the structure of the file, it simply replaces part of the code of '<! DOCTYPE html> <html>' by '<html dir="Ltr">' so it can only be a bug, I’ll wait for the fix.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.