By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,750 Members | 1,471 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,750 IT Pros & Developers. It's quick & easy.

Russian and javascript

P: n/a
I've built a site in English and an now translating it into Russian. My
html charset= utf-8 and my vbscript codepage is 65001. I'm using
DreamWeaver.

If there is a Javascript function in a page then I can cut and paste the
Russian in place of the English satisfactorily.

I have a page of common Javascript functions in an include file. When I cut
and paste Russian into this file, all I get is a string of ?????????????

Any help gratefully received.

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 12 '06 #1
Share this Question
Share on Google+
9 Replies


P: n/a
ASM
Roger Withnell a écrit :
I've built a site in English and an now translating it into Russian. My
html charset= utf-8 and my vbscript codepage is 65001.
why won't you use utf-8 everywhere ?
I'm using DreamWeaver.
My poor ...
If there is a Javascript function in a page then I can cut and paste the
Russian in place of the English satisfactorily.

I have a page of common Javascript functions in an include file.
You mean an external file with javascript scripts
called with <script src="myFunctions.js" ...
?
When I cut
and paste Russian into this file, all I get is a string of ?????????????
Encode your JS page in utf-8 !

In My tests that works fine.

--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Contact : http://stephane.moriaux.perso.wanadoo.fr/contact
Nov 12 '06 #2

P: n/a
ASM wrote:
Roger Withnell a écrit :
>I've built a site in English and an now translating it into Russian.
My html charset= utf-8 and my vbscript codepage is 65001.

why won't you use utf-8 everywhere ?
Codepage 65001 is UTF-8. Microsoft still insists that encodings have
numbers instead of names.

--
John W. Kennedy
"The blind rulers of Logres
Nourished the land on a fallacy of rational virtue."
-- Charles Williams. "Taliessin through Logres: Prelude"
Nov 13 '06 #3

P: n/a
ASM
John W. Kennedy a écrit :
ASM wrote:
>Roger Withnell a écrit :
>>I've built a site in English and an now translating it into Russian.
My html charset= utf-8 and my vbscript codepage is 65001.

why won't you use utf-8 everywhere ?

Codepage 65001 is UTF-8. Microsoft still insists that encodings have
numbers instead of names.
I don't know what is codepage ... and don't use vbscript (Mac)
The OP use DW : what DW does with codepage by M$ numbers ?
--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Nov 13 '06 #4

P: n/a
Roger Withnell wrote:
I've built a site in English and an now translating it into Russian. My
html charset= utf-8 and my vbscript codepage is 65001. I'm using
DreamWeaver.

If there is a Javascript function in a page then I can cut and paste the
Russian in place of the English satisfactorily.
Old style:

<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=koi8-r">
</head>
<body>
Russian characters go here
</body>
</html>

(The browser must have the koi8-r charset, which is not a problem
nowadays)

Windows style (not recommended):

<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=windows-1251">
</head>
<body>
Russian characters go here
</body>
</html>

New style:

<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=UTF-8">
</head>
<body>
Russian characters go here
</body>
</html>

Happy-that-it-works style:

<html>
<body>
области
(Russian characters represented as their HTML numeric entities)
</body>
</html>
I have a page of common Javascript functions in an include file. When I cut
and paste Russian into this file, all I get is a string of ?????????????
I'ld suggest to open the external js file in Notepad or the like, then
add the Russian characters, and then save as UTF-8 in stead of ANSI
(Notepad's default).

Hope this helps,

--
Bart

Nov 13 '06 #5

P: n/a
Roger Withnell wrote:
I have a page of common Javascript functions in an include file. When I cut
and paste Russian into this file, all I get is a string of ?????????????
Make sure the script file is UTF-8 encoded and then use
<script type="text/javascript" src="file.js" charset="UTF-8"></script>
to include the script file in the HTML document.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Nov 13 '06 #6

P: n/a
"ASM" <st*********************@wanadoo.fr.invalidwrote in message
news:45***********************@news.orange.fr...
Roger Withnell a écrit :
>I've built a site in English and an now translating it into Russian. My
html charset= utf-8 and my vbscript codepage is 65001.

why won't you use utf-8 everywhere ?
>I'm using DreamWeaver.

My poor ...
>If there is a Javascript function in a page then I can cut and paste the
Russian in place of the English satisfactorily.

I have a page of common Javascript functions in an include file.

You mean an external file with javascript scripts
called with <script src="myFunctions.js" ...
?
>When I cut and paste Russian into this file, all I get is a string of
?????????????

Encode your JS page in utf-8 !

In My tests that works fine.

--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Contact : http://stephane.moriaux.perso.wanadoo.fr/contact
But how do I "Encode your JS page in utf-8"?

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 13 '06 #7

P: n/a
Roger Withnell wrote:
But how do I "Encode your JS page in utf-8"?
With a text editor that supports writing and saving text files that are
UTF-8 encoded.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Nov 13 '06 #8

P: n/a
ASM
Roger Withnell a écrit :
"ASM" <st*********************@wanadoo.fr.invalidwrote in message
news:45***********************@news.orange.fr...
>Encode your JS page in utf-8 !

In My tests that works fine.
But how do I "Encode your JS page in utf-8"?
As told by ether else :
- open your JS file in your text editor (NotePad+ or BBEdit)
- in BBE set the file in utf-8 and save it
- in NotePad+ I think you have to save it as ...
under format : utf-8

--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Nov 13 '06 #9

P: n/a
ASM said the following on 11/13/2006 11:58 AM:

- in NotePad+ I think you have to save it as ...
under format : utf-8
Close, it is in a menu that is labeled "Encoding".

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 13 '06 #10

This discussion thread is closed

Replies have been disabled for this discussion.