Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

display different chars

Posted on 2006-11-07
12
Medium Priority
?
213 Views
Last Modified: 2010-03-04
hello,
why when I type this --> niños
and put it on the server I see --> ni?os
can someone help me fix this ?
0
Comment
Question by:Sabrin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
  • +2
12 Comments
 
LVL 30

Expert Comment

by:callrs
ID: 17892258
http://www.experts-exchange.com/Q_22036782.html Problem displaying characters "é"

Either specify the charater encoding as iso-8859-1, or use ñ or ñ

Try this demo, then comment out the first meta tag & activate the second meta tag & watch the display change:

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
</head>
<p>
iso-8859-1: niños Brésil
<p>
Utf-8, iso-8859-1: ni&#241;os ni&ntilde;os  Br&#233;sil Br&eacute;sil
<p>
Utf-8:  Brésil

<p>

Character codes: http://www.ascii.cl/htmlcodes.htm
0
 

Author Comment

by:Sabrin
ID: 17991889
no this is not what I mean
I know that if you type &amp; that mean & or
&ntilde; means ñ etc.. chars like that but
I have ñ on all pages and not &ntilde;
can someone help?
0
 
LVL 30

Expert Comment

by:callrs
ID: 17991912
If you simply want to use  ñ and not &ntilde , it won't show properly unless you specify the character encoding (as iso-8859-1).

Try this: Add this line to your html file in the <head> section:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Sabrin
ID: 17992182
didnt work
0
 
LVL 30

Expert Comment

by:callrs
ID: 17992308
May be a syntax problem. Even slight error can make it not work.

Try this. Select, copy, paste the code from my first post (from the <head> through to the <p> tag) into a text file and save it as demo.htm. Then open demo.htm in your browser.

Only other thing I can suggest is post the file that's not working here: www.sendspace.com, then post the link to it here so we can take a direct look.

0
 
LVL 15

Assisted Solution

by:periwinkle
periwinkle earned 800 total points
ID: 17992823
callrs is right.  You can't simply copy the character from, say, Microsoft Word, into a web site and use the default character encoding, and expect the tilde to appear.  The web site has to specify a character encoding that the user's machine can interpret properly.  A given character encoding may not be able to express all characters of the document character set. - then one has to use a character entity reference such as &tilde; to display that character.

See:

http://www.w3.org/TR/html4/charset.html
http://www.w3.org/MarkUp/html3/latin1.html
http://www.w3schools.com/tags/ref_entities.asp
0
 
LVL 19

Expert Comment

by:ramazanyich
ID: 17993659
Could you clarify your problem ?
On which operating system your web server is running.
Is it static html page or JSP, ASP, PHP page ?
In which editor do you save your files ?
0
 
LVL 16

Accepted Solution

by:
HackneyCab earned 1200 total points
ID: 18003475
It's not enough to stick a character encoding at the top of the web page. If that page was created in an editor that is saving the files in the UTF-8 encoding, adding a charset=iso-8859-1 value to the Content-type will not display the page properly.

Sabrin, you need to work out which character encoding your web page editor is using to save the files. Then you need to declare that encoding in the Content-type meta tag like callrs suggests.

Usually, on a good text editor, the character encoding can be chosen in a submenu of the File menu, or in the Properties sub-menu (which is often found in the Tools menu). However, if you're using a page or text editor that doesn't let you choose or find out the character encoding being used, you'll need to work out the character encoding some other way. Then switch to a better text editor so that you know what encoding you're working with in future.

Tell us which editor you are using to save these pages.
0
 

Author Comment

by:Sabrin
ID: 18005011
why will I have to edit 100 pages done using dreamweaver rather
than just editing the httpd.conf from apache? I dont want to edit
those pages I just want to edit the configuration maybe something
in .htaccess or something!
0
 

Author Comment

by:Sabrin
ID: 18005020
since I changed of hosting company everything was working fine!
now is that I have problems with the pages!
0
 
LVL 16

Expert Comment

by:HackneyCab
ID: 18005470
Yes, if you know the character encoding you can set a directive in Apache that sets the default encoding. But you need to work out which encoding Dreamweaver is saving your files to.
0
 

Author Comment

by:Sabrin
ID: 18005546
ok, just  tell me how to do this for a virtual site! thanks
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question