Jump to content

how to show diacritics in a html page from javascript file

- - - - -

  • Please log in to reply
2 replies to this topic

#1
mariangurdegir

mariangurdegir

    Newbie

  • Members
  • Pip
  • 1 posts
Hello. I am having some problems with something probably very easy...but it seems not for me. I have a JS file with the date (day, month, time) and in a webpage it shows that. Well, with normal characters for the english page, it works fine. For the turkish page, the diacritics are not showed. What and how do i have to do so i can see the diacritics from the javascript file in my webpage? Thanks and sorry if i'm being to stupid to ask this question :)

#2
mebob

mebob

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 490 posts
This is the wrong place for your question; you are asking about Javascript, but this is the forum for Java. Please see the "Javascript and CSS" forum.
Latinamne loqueris?

#3
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
  • Location:Vancouver, Eh! Cleverness: 200
Note: I had moved the thread to the appropriate section.

You would probably want to set all web page headers to UTF-8, provided the JS file is saved in a UTF-like format.

Try adding this within the <head> section of your web page showing the JS:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
This should hint the browser to switch to a mode that can display more characters. If the diacritics are still question mark symbols or boxes, feel free to reply with a little more information.

Alexander.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users