# Character references

**URL:** <https://www.ruby-forum.com/t/character-references/236178>\
**Category:** NGINX\
**Created:** [August 12, 2013, 2:26pm UTC](https://www.ruby-forum.com/t/character-references/236178 "2013-08-12T14:26:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [August 12, 2013, 2:26pm UTC](https://www.ruby-forum.com/t/character-references/236178/1 "2013-08-12T14:26:55Z")

</div>

If I use character reference in html file to represent a character and  
web  
server sends the file on browser request, how the browser will decode  
the  
character reference?  
My Nginx web server is configured to not send character encoding in the  
header I have set character encoding in the meta tag on page level to  
utf8.

---

<div class="post-metadata">

**Author:** ![Spirovski\_Dejan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/d78d45/32.png) [@Spirovski\_Dejan](https://www.ruby-forum.com/u/Spirovski_Dejan)\
**Post date:** [August 12, 2013, 3:06pm UTC](https://www.ruby-forum.com/t/character-references/236178/2 "2013-08-12T15:06:40Z")

</div>

Hi Dejan,

> If I use character reference in html file to represent a character and  
> web server sends the file on browser request, how the browser will  
> decode the character reference?  
> My Nginx web server is configured to not send character encoding in the  
> header I have set character encoding in the meta tag on page level to  
> utf8.

This is off-topic, as this is about browser behavior, not webserver or  
nginx specific behavior.

My experience is that, when both html meta tag and HTTP header are  
setting  
the charset, the one in the HTTP header takes precedence. When the HTTP  
header doesn’t specify the charset, browser usually refer to the html  
meta  
tag. Different browser vendor and releases may have a different  
behavior.

YMMV.

I strongly suggest you set the correct charset in the HTTP header.

Regards,  
Lukas

---

<div class="post-metadata">

**Author:** ![Spirovski\_Dejan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/d78d45/32.png) [@Spirovski\_Dejan](https://www.ruby-forum.com/u/Spirovski_Dejan)\
**Post date:** [August 12, 2013, 3:27pm UTC](https://www.ruby-forum.com/t/character-references/236178/3 "2013-08-12T15:27:42Z")

</div>

Lukas yeah thanks I will I guess I aggree with you but I am jst asking
