How to get my HTML file to read Cyrllic
Thread poster: Susan Welsh

Susan Welsh  Identity Verified
United States
Local time: 17:22
Member (2008)
Russian to English
+ ...
May 7, 2009

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


Direct link Reply with quote
 

Piotr Bienkowski  Identity Verified
Poland
Local time: 23:22
Member (2005)
English to Polish
+ ...
Unicode May 7, 2009

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


Direct link Reply with quote
 

Susan Welsh  Identity Verified
United States
Local time: 17:22
Member (2008)
Russian to English
+ ...
TOPIC STARTER
Text editor May 7, 2009

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.

Direct link Reply with quote
 

Frederic Lievre
Ireland
Local time: 22:22
English to French
+ ...
And also... May 7, 2009

Will have to be sure that the target browser can read the encoding...

Direct link Reply with quote
 

Didier Briel  Identity Verified
France
Local time: 23:22
Member (2007)
English to French
+ ...
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]


Direct link Reply with quote
 

Susan Welsh  Identity Verified
United States
Local time: 17:22
Member (2008)
Russian to English
+ ...
TOPIC STARTER
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.


Direct link Reply with quote
 

Susan Welsh  Identity Verified
United States
Local time: 17:22
Member (2008)
Russian to English
+ ...
TOPIC STARTER
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


Direct link Reply with quote
 

Didier Briel  Identity Verified
France
Local time: 23:22
Member (2007)
English to French
+ ...
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


Direct link Reply with quote
 

Piotr Bienkowski  Identity Verified
Poland
Local time: 23:22
Member (2005)
English to Polish
+ ...
Kwrite, Kate May 7, 2009

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


Direct link Reply with quote
 

Vito Smolej
Germany
Local time: 23:22
Member (2004)
English to Slovenian
+ ...
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">
....


Direct link Reply with quote
 

Susan Welsh  Identity Verified
United States
Local time: 17:22
Member (2008)
Russian to English
+ ...
TOPIC STARTER
Success May 7, 2009

What Didier and Vito said did the trick. Thanks to all for your help.

Susan


Direct link Reply with quote
 


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






SDL Trados Studio 2017 Freelance
The leading translation software used by over 250,000 translators.

SDL Trados Studio 2017 helps translators increase translation productivity whilst ensuring quality. Combining translation memory, terminology management and machine translation in one simple and easy-to-use environment.

More info »
SDL MultiTerm 2017
Guarantee a unified, consistent and high-quality translation with terminology software by the industry leaders.

SDL MultiTerm 2017 allows translators to create one central location to store and manage multilingual terminology, and with SDL MultiTerm Extract 2017 you can automatically create term lists from your existing documentation to save time.

More info »



Forums
  • All of ProZ.com
  • Term search
  • Jobs
  • Forums
  • Multiple search