Forum Moderators: open
I'm building a site in SHTML and want for it to be in Swedish, therefore need to use Swedish characters.
I edit the files in "WordPad" and than save them as .shtml. Problem is that every time I save them when I open the Swedish Characters come out as?.
Anyone have any idea how or maybe which software I should use to edit these shtml files?
Thanks!
TOG
I edit pages in notepad and when you "save as" there is an encoding option at the bottom. I believe "save and forget" works fine as I constantly edit over 20 translation pages that when I go back and edit notepad does not prompt me again (it's smart enough to realize it's the encoding I set prior and not to mess with it).
Wordpad looks a bit different and I do not like the encode options there, a bit fuzzy. Golden rule is, if it does not explicitly declare that it is what you want assume it's not what you want.
There are better text editors around though I do my coding in notepad. Textedit is what I use to open access logs and it has some nice options plus once I'm not utterly broke I will buy a copy (but you can use it fine until you can). There are of course plenty of other editors and it depends on what your preference is. Textpad has to be manually setup if you like your windows keystroke (ctrl+x for cut in example versus other programs may use (going to make something up here) alt+c). Look around and expand your options. Usually when I find something that works perfect, I save the install file(s) and buy it (if I have the money at the time).
In my opinion you can work with things better then Wordpad. The only thing I use Wordpad for is when I have to format a non-windows text file. Usually you'll see square blocks where line breaks should be in Notepad (so I simply open the file with Wordpad, save, and then open it back in Notepad). Thats Wordpad's only use for me.
I hope this helps to an extent but if you're dead set on using Wordpad then you'll probably want someone else's opinion.
John
Wordpad is not really an appropriate tool for what you are doing - it will not always handle the files appropriately for web use. Your best tool would be a text editor designed for web development: many possibilities exist, some free, including HTML-Kit, TextEdit, Editpad, Editplus, and many others. Notepad is problematic too despite being surprisingly popular for web development use.
The problem you are experiencing is related to the character encoding ("charset") of the page as displayed by the browser. Are you declaring a charset on the page with a meta charset tag or other? If not, you have two possibilities: you can save the files as ISO-8859-1 (which contains the characters for Swedish), or if your editor specifically supports it, then you could use UTF-8.
I wrote a short introduction to character encoding a while ago that you might find useful:
[webmasterworld.com...]
I tried edit+ and the only format where the page displays correctly was "western European".
BUT, when I see the source code I get a lot of weird characters, meaning that search engines would not scan this site as correct Swedish.
Here is the page: <snip> (not all of it is Swedish)
Look at the source code, looks very odd.
Best
TOG
[edited by: encyclo at 7:51 pm (utc) on Jan. 8, 2006]
[edit reason] No URLs please! See TOS [webmasterworld.com] [/edit]
<meta http-equiv="Content-Type" content="text/html; charset=[b]ISO-8859-1[/b]"> This should be placed before the
title element in the head section of your page. If you are declaring a different charset (such as UTF-8) the page will display incorrectly unless you explicitly convert the page contents to that charset.
You may need to copy/paste your original content to your text editor again and re-save with ISO-8859-1 encoding (Western European). Then replace any unrecognized characters in the source code and re-upload the result.