Jump to content

Check out our Community Blogs

Register and join over 40,000 other developers!

Recent Status Updates

View All Updates

- - - - -

how to show diacritics in a html page from javascript file


  • Please log in to reply
2 replies to this topic

#1 mariangurdegir


    CC Lurker

  • Just Joined
  • Pip
  • 1 posts

Posted 19 January 2012 - 07:57 AM

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 :)
  • 0

#2 mebob


    CC Devotee

  • Validating
  • PipPipPipPipPipPip
  • 467 posts
  • Programming Language:C, C++, Assembly
  • Learning:PHP

Posted 19 January 2012 - 01:26 PM

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.
  • 0
Latinamne loqueris?

#3 Alexander



  • Moderator
  • 3963 posts
  • Location:Vancouver, Eh! Cleverness: 200
  • Programming Language:C, C++, PHP, Assembly

Posted 20 January 2012 - 12:00 PM

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.

  • 0

All new problems require investigation, and so if errors are problems, try to learn as much as you can and report back.

Also tagged with one or more of these keywords: HTML

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download