Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2007

Tip: Looking for answers? Try searching our database.

Help needed with simple Java script

Thread view: 
nela - 31 Jan 2007 09:44 GMT
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.
Joshua Cranmer - 28 Feb 2007 23:36 GMT
> Hello everyone, from Croatia !
>
[quoted text clipped - 19 lines]
>
> 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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.