homepage Welcome to WebmasterWorld Guest from 54.234.0.85
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
Russian Encoding Problem
Meta language and charset question
King of Bling




msg:4494226
 11:12 am on Sep 12, 2012 (gmt 0)

Using Google Translate, I am doing a 'rough' translation of a page. When I view (XP/FF), all I see is "? ?" etc.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Language" content="ru">
<meta http-equiv="content-type" content="text/html; charset=win-1251">
<title>Title</title>
</head>

Where am I making my error? I can view other pages in Russian from other websites.

Thanks,
John

 

g1smd




msg:4494238
 11:16 am on Sep 12, 2012 (gmt 0)

Use UTF-8 encoding if you can.

Before UTF-8 was available I used various of the ISO-8859-x options, but that's no longer necessary.

I've never used any of the win-xxxx or other encodings.

King of Bling




msg:4494376
 4:19 pm on Sep 12, 2012 (gmt 0)

Changed to:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Language" content="ru">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
</head>

But still getting a string of ?'s instead of page text, titles, etc. What could I be doing wrong?

Thanks again,
John

g1smd




msg:4494393
 5:08 pm on Sep 12, 2012 (gmt 0)

You'll also need to save the page as UTF-8 from your text editor.

King of Bling




msg:4494400
 5:32 pm on Sep 12, 2012 (gmt 0)

All these years, never knew about that export option. It worked. Thank you!

Is that something you'd save all html pages as?

g1smd




msg:4494434
 7:16 pm on Sep 12, 2012 (gmt 0)

I've used UTF-8 for almost everything for at least several years. Your text editor should allow you to set it as a default.

phranque




msg:4494618
 7:32 am on Sep 13, 2012 (gmt 0)

sometimes you'll see that when you don't have the proper character set installed on your computer.
don't forget if you use a database all the content there should also use a consistent encoding.
I would add a language attribute to your <html> tag.

King of Bling




msg:4494681
 10:50 am on Sep 13, 2012 (gmt 0)

Ahhh, I've heard that. Does this look like the proper syntax?

html lang="ru"

phranque




msg:4494703
 11:37 am on Sep 13, 2012 (gmt 0)

yes that looks correct (with angle brackets pre/appended, of course)

lucy24




msg:4494870
 8:20 pm on Sep 13, 2012 (gmt 0)

sometimes you'll see that when you don't have the proper character set installed on your computer.

If your computer doesn't have a single font with Cyrillic characters [alanwood.net], you need a new computer ;) The problem is far more likely to be an elderly browser that doesn't do Font Substitution so you have to change fonts manually. If it's a very old browser, it can't even read the <charset> declaration. But that's oooold. (Like, say, MSIE5, my Gold Standard for elderly browsers.)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved