Welcome to WebmasterWorld Guest from 54.196.208.6

Forum Moderators: incrediBILL

Message Too Old, No Replies

Russian Encoding Problem

Meta language and charset question

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

Full Member

10+ Year Member

joined:Sept 22, 2003
posts: 225
votes: 2


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
11:16 am on Sept 12, 2012 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 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.
4:19 pm on Sept 12, 2012 (gmt 0)

Full Member

10+ Year Member

joined:Sept 22, 2003
posts: 225
votes: 2


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
5:08 pm on Sept 12, 2012 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 0


You'll also need to save the page as UTF-8 from your text editor.
5:32 pm on Sept 12, 2012 (gmt 0)

Full Member

10+ Year Member

joined:Sept 22, 2003
posts: 225
votes: 2


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

Is that something you'd save all html pages as?
7:16 pm on Sept 12, 2012 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 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.
7:32 am on Sept 13, 2012 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10542
votes: 8


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.
10:50 am on Sept 13, 2012 (gmt 0)

Full Member

10+ Year Member

joined:Sept 22, 2003
posts: 225
votes: 2


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

html lang="ru"
11:37 am on Sept 13, 2012 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10542
votes: 8


yes that looks correct (with angle brackets pre/appended, of course)
8:20 pm on Sept 13, 2012 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month

joined:Apr 9, 2011
posts:12702
votes: 244


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.)