Accent in html shows as �


#1

Hi.

Today i tried to edit a html file i download through FileZilla, but when i opened it on Atom all the letters that had an accent were replaced with this symbol �.

The main problem with this is that if I edit that file and upload again, this symbol(�) replaces all the accents when displaying the website in the browser.

I opened the same file in a notepad and I did not find this problem.

I tried using a diferent font family and I am using UTF-8.

Thank you for your time.


#2

This is a support forum for the Atom editor, not FileZilla.

If this doesn’t help, start a new thread on that forum!


#3

Thank you for your answer, but the problem is not with FileZille, as I was able to open an edit the same file without that problem in a different text editor like Sublime Text or NotePad.


#4

when i opened it on Atom all the letters that had an accent were replaced with this symbol �

So your problem is on atom side, with a downloaded file.

I opened the same file in a notepad and I did not find this problem.

I am using UTF-8

Maybe your file is not utf-8. (Either becaue it was not utf-8 on the server or the ftp software is doing conversion for you.) By default notepad use a window encoding like window 1252 or latin-1 (iso 8859-1)

The main problem with this is that if I edit that file and upload again, this symbol(�) replaces all the accents when displaying the website in the browser.

Yes if you edit from encoding A, into encoding B and reupload it’ll still think it’s encoding A and have all character wrong.


I suggest you find native charset of your file and edit with that.
(I think it’s a longstanding problem that atom charset detection is so-so )

Alternatively maybe filezilla is doing some conversion behind the scene or your server need to be configured for utf-8


#5

Yes, the problem was definitly with encoding. I changed the encoding in the settingos to iso 8859-1 and it works perfectly now.

I am not the original author of the website, so i supposed it was originally encoded with utf-8, but I was wrong I guess.

I supose this topic does not fit the support section anymore, I’ll see if i can change it.

Thank you again for your time.:grin:


#6

I’ve the very same problem, but found no solution yet.
I’m working with a Ubuntu box configured in UTF-8 (as I’ve read it’s the only way a Ubuntu can be configured), and every other dev here uses MS Windows.

I’ve setup atom into Western (ISO 8859-1) as is the source files I work on.
I open a new file, type “ññ” and save it:
ais@redux5:$ file a
a: ISO-8859 text

I close and open it and it shows as
��
And so it’s displayed in the browser :frowning:


#7

Fixed it (Ubuntu?) installing “node-iconv”!

Solution doesn’t work in 1.17beta3 :confused:


#8

Have you tried other encoding ? What happens in final environment ?

Might be final server setup that matter in the end.


#9

My last post contains the solution. The .deb package manually installed in Ubuntu doesn’t install or check the node iconv support. Yes, I’ve tried every charset that could be in use (Windows1252, UTF8 and so on), and no, the filesystem or server weren’t involved.
The problem showed even after closing and reopen Atom, so if anyone else is having this problem might check this solution.

Thank you anyway for your interest :relaxed: