Meta tags are useless when the file encoding is anything but utf-8. Please try save the file again using a different text editor such as NotePad++ and then upload the file.
Because the file encoding and the Operating System used by the server are contributing factors. Linux cannot encode files which use Windows encoding and will return ? Instead.
Thanks for your help. I will try when I get my FTP connection working. Have worked before, but now it stops so I cannot transfer files. No change of settings. ???
I don’t know what FTP client you’re using and with what settings, so I don’t know what that error means.
We recommend FileZilla instead. Not just because it’s a good, free, cross-platform FTP client, but also because it has quite good logging for troubleshooting:
Normally this can be resolved via having all system, FTP and file encodings set to UTF-8, but in case you’re having difficulties doing that there’s another solution.
Replace all instances of special characters like æ, ø, å using Unicode character reference. As these references only use ASCII space of the character set, you can preserve all character displays using this method regardless of the encoding you used. Just make sure you have a line of <meta charset="utf-8" /> in your HTML code.
For your convenience, the characters you need include: æ → æ ø → ø å → å
You can look at your character from this website using the search function and copy the reference in either columns (the above is taken from the HTML column):
You can also do “Find and replace” in your code editor so you need not search through the entire codebase, VSCode is a good tool for this purpose (and coding overall) as well.
Thanks a lot. I got my Ftp working, and got æ, ø, å correct on my main page. I would rather not have to convert all æ, ø, å to unicode, as I have many files in subdirectories.
Is there another way to make these work - htaccess perhaps - and how?
Kind regards
VSCode offers a feature called “Search in Folder”, which supports wildcards as well. You can easily replace every instance of special characters in every code file as you need with simply *.php as the filter and the usual find and replace routine.
Meanwhile, .htaccess is for configuring the server handle instead of the web application that you’re working on.
If you have got FTP working and somehow the main page is showing correctly, that means that at some point you have achieved UTF-8 throughout the connection, which is geat. If you managed to do that again, simply re-upload all files and they’ll all be in UTF-8 encoding, and your problem will be solved.
When inspecting your website, we noticed that some pages do have issues showing characters, however, we also noticed that even though the content type is set to UTF-8, your page has a meta tag that overrides the encoding to something else: <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
You might want to remove these lines from all your files to make them UTF-8. Unfortunately, since this is from within each file, there is no shortcut to this. The fastest way to replace the meta tag with nothing is to do it via VSCode/Notepad++, both offering the replace-in-files feature. You should also check if these files all have the same meta encoding just in case.
As I also noticed that you used some sort of page index generator, you might be able to change this from the application settings (if available) and generate all the pages again. <meta name="Generator" content="GEDHTanc Version 2.46.1"> https://jvo.dk/jvo/gedcom/gedhtanc.htm
Please note that setting charsets with meta tags is not supported with HTML5. With HTML5, you must always use UTF-8 encoding. Your site is using an outdated HTML version so it might be fine, but relying on outdated functionality to run your website is not a good long term solution.
So the proper solution is to convert the encoding of your files. As for how to do that, I don’t know. Maybe there are tools that can automatically convert all the files in a directory. Or if you are using certain software to edit your website, maybe it has an option to save all files as UTF-8.
Hi chiucs123
I have changed the first 16 htm files (anc00001.htm - anc00016) and just by changing xE6 (white in black box) to æ these pages shows correctly.
All other text can be changed in one go by Notepad++, but unfortunately this (xE6) can not be handled by Notepad++. VSCode can, but only one file at a time.
Or have I overlooked something.
Thank you very much for trying to help.
Kind regards
In VSCode file listing, select the folder that contains the HTML files or anywhere blank to select the root, right click and choose “Find in Files”, then you’ll be brought to a search result list. From the search box, hit CTRL + H, and a replace box will appear, input the character you need and press CTRL + Shift + Enter and you’ll be able to replace accross files.
I guess this is not the issue with x32, you can try open folder instead to see if you can at least see a file tree first, then right click on the folder to see if there’s an option to find in folder.
I think that was what I did. I got the list (tree?) and marked all files as shown here, and the result was as shown in my former picture (no results found).