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

Help needed with simple Java script

P: n/a
Hello everyone, from Croatia !

I am designing a site for a Serbian client, and the english page is ok, but
the serbian page needs to be cyrillic. It was no problem for Photoshop
design, but I inserted a little greeting in java (found free online), good
morning, good afternoon... This is part of the code:

hours = today.getHours();
if (hours<12) greeting = 'Good morning!';
if (hours<18 && hours>11) greeting = 'Good afternoon!';

For example:

????? ?????
????? ?????
????? ???

I would like those greetings to show on the page in cyrillic writing, font
name is ArialCYR to be exact. How do I tell Java to display cyrillic ???
I don't have experience with classes etc, so not sure
Thanks ! (if you wish to see, the site is radgost-scl.com)

Nela.

Jan 31 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
nela wrote:
Hello everyone, from Croatia !

I am designing a site for a Serbian client, and the english page is ok, but
the serbian page needs to be cyrillic. It was no problem for Photoshop
design, but I inserted a little greeting in java (found free online), good
morning, good afternoon... This is part of the code:

hours = today.getHours();
if (hours<12) greeting = 'Good morning!';
if (hours<18 && hours>11) greeting = 'Good afternoon!';

For example:

????? ?????
????? ?????
????? ???

I would like those greetings to show on the page in cyrillic writing, font
name is ArialCYR to be exact. How do I tell Java to display cyrillic ???
I don't have experience with classes etc, so not sure
Thanks ! (if you wish to see, the site is radgost-scl.com)

Nela.
Looking at the source of your web page, you're using JavaScript, not
Java, so you should be using the comp.lang.javascript newsgroup (that's
where I set the followup-to field).

Anyways, if you just put the text in like this:

greeting = ' ';

it should work. However, the server is currently sending the file as
Windows-1250, when it should be Windows-1251 or UTF-8 (or any other
encoding capable of supporting Cyrillic characters), so without changing
the file encoding, the text would become gibberish (????, e.g.). Please
don't ask me how to do that, because it is quite system-dependent.
Feb 28 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.