Welcome to WebmasterWorld Guest from 54.227.231.144

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)

10+ Year Member



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 Sep 12, 2012 (gmt 0)

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



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 Sep 12, 2012 (gmt 0)

10+ Year Member



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 Sep 12, 2012 (gmt 0)

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



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

10+ Year Member



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 Sep 12, 2012 (gmt 0)

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



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 Sep 13, 2012 (gmt 0)

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



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 Sep 13, 2012 (gmt 0)

10+ Year Member



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

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

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



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

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



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