How to get my HTML file to read Cyrllic Autor de la hebra: Susan Welsh
| Susan Welsh Estados Unidos Local time: 18:09 Miembro 2008 ruso a inglés + ...
I am trying to set up a website for myself that shows sample translations side by side--in some approximation of the way ProZ does, although not so fancy. I have a lot of problems, but the main one is that Cyrillic comes out as gibberish. The file in the text editor (blah_blah.html) looks fine, but when I open it in a browser, the character encoding is ignored, or something.
I hope there is an easy solution...!
Susan | | |
Susan Welsh wrote:
I am trying to set up a website for myself that shows sample translations side by side--in some approximation of the way ProZ does, although not so fancy. I have a lot of problems, but the main one is that Cyrillic comes out as gibberish. The file in the text editor (blah_blah.html) looks fine, but when I open it in a browser, the character encoding is ignored, or something.
I hope there is an easy solution...!
Susan
If you want to display text in many languages and alphabets, Unicode is the answer. Regardless of the language, the text should be encoded in UTF-8 or UTF-16. What is the text editor you use?
HTH.
Regards
Piotr | | | Susan Welsh Estados Unidos Local time: 18:09 Miembro 2008 ruso a inglés + ... PERSONA QUE INICIÓ LA HEBRA
I am using the gedit text editor in Linux. I know to put .utf8 when creating an ordinary text file, but this is .html so I am not sure how to specify the encoding. | | |
Will have to be sure that the target browser can read the encoding... | |
|
|
Didier Briel Francia Local time: 00:09 inglés a francés + ... Use an encoding declaration | May 7, 2009 |
Susan Welsh wrote:
I am using the gedit text editor in Linux. I know to put .utf8 when creating an ordinary text file, but this is .html so I am not sure how to specify the encoding.
You have to tell the browser the encoding of your document.
If you use UTF-8, that would be
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
somewhere in the "head" part - between <head> and </head>.
Of course, your document must also be saved as UTF-8, but this you already know.
Didier
[Edited at 2009-05-07 12:52 GMT] | | | Susan Welsh Estados Unidos Local time: 18:09 Miembro 2008 ruso a inglés + ... PERSONA QUE INICIÓ LA HEBRA Target browser read the encoding? | May 7, 2009 |
Frederic Lievre wrote:
Will have to be sure that the target browser can read the encoding...
I don't understand. It's Firefox, and it certainly can read Cyrillic documents. Maybe the problem is that I haven't specified an encoding so it's defaulting to something that can't be read. See reply to Didier, below. | | | Susan Welsh Estados Unidos Local time: 18:09 Miembro 2008 ruso a inglés + ... PERSONA QUE INICIÓ LA HEBRA I already know? | May 7, 2009 |
Didier Briel wrote:
Susan Welsh wrote:
I am using the gedit text editor in Linux. I know to put .utf8 when creating an ordinary text file, but this is .html so I am not sure how to specify the encoding.
You have to tell the browser the encoding of your document.
If you use UTF-8, that would be
somewhere in the "head" part - between and .
Of course, your document must also be saved as UTF-8, but this you already know.
The first part, I didn't know, so that I can easily do.
The second part, about saving as UTF-8 -- Well, I "already know" it for text files, but when a file has the extension .html, how do you save it as .utf8 also?
Susan | | | Didier Briel Francia Local time: 00:09 inglés a francés + ... No difference between text files and HTML | May 7, 2009 |
Susan Welsh wrote:
Didier Briel wrote:
Susan Welsh wrote:
I am using the gedit text editor in Linux. I know to put .utf8 when creating an ordinary text file, but this is .html so I am not sure how to specify the encoding.
Of course, your document must also be saved as UTF-8, but this you already know.
The first part, I didn't know, so that I can easily do.
The second part, about saving as UTF-8 -- Well, I "already know" it for text files, but when a file has the extension .html, how do you save it as .utf8 also?
A HTML file is a text file. I think you're confusing extension (.utf8 or .html) and encoding. If, when you save your .utf8 files, they behave as UTF-8 files, this means the encoding is indeed UTF-8. Use the same procedure for your HTML files.
Didier | |
|
|
I don't know gedit, but I know for sure that both Kwrite and Kate can open and save utf 8 encoding without any problems.
You cound also try Quanta+, but I'm not sure if any of the three I mentioned runs under the Gnome environment.
HTH
Piotr | | | Vito Smolej Alemania Local time: 00:09 Miembro 2004 inglés a esloveno + ... LOCALIZADOR DEL SITIO Let's be practical... | May 7, 2009 |
the header of the HTML file should contain charset statement as follows:
<head>
<meta content="text/html; charset=utf-8" http-equiv="content-type">
.... | | | Susan Welsh Estados Unidos Local time: 18:09 Miembro 2008 ruso a inglés + ... PERSONA QUE INICIÓ LA HEBRA
What Didier and Vito said did the trick. Thanks to all for your help.
Susan | | | To report site rules violations or get help, contact a site moderator: You can also contact site staff by submitting a support request » How to get my HTML file to read Cyrllic Advanced search Protemos translation business management system | Create your account in minutes, and start working! 3-month trial for agencies, and free for freelancers!
The system lets you keep client/vendor database, with contacts and rates, manage projects and assign jobs to vendors, issue invoices, track payments, store and manage project files, generate business reports on turnover profit per client/manager etc.
More info » |
| PerfectIt consistency checker | Faster Checking, Greater Accuracy
PerfectIt helps deliver error-free documents. It improves consistency, ensures quality and helps to enforce style guides. It’s a powerful tool for pro users, and comes with the assurance of a 30-day money back guarantee.
More info » |
|
| | | | X Sign in to your ProZ.com account... | | | | | |