# Charset utf-8

**URL:** <https://www.ruby-forum.com/t/charset-utf-8/220036>\
**Category:** NGINX\
**Created:** [May 25, 2012, 9:05am UTC](https://www.ruby-forum.com/t/charset-utf-8/220036 "2012-05-25T09:05:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [May 25, 2012, 9:05am UTC](https://www.ruby-forum.com/t/charset-utf-8/220036/1 "2012-05-25T09:05:40Z")

</div>

Hi guys, I’m using nginx 1.2 with php-fpm (php 5.3.11). The problem is,  
the PHP page is delivered as  
Content-Type: text/html; charset: Windows-1251

I want the charset UTF-8, or at least none at all.  
I tried putting charset utf-8; or charset off; to nginx.conf, it didn’t  
help.  
Can I fix that? Thanks.

Posted at Nginx Forum:

> **[charset utf-8](https://forum.nginx.org/read.php?2,226822,226822#msg-226822)**
>
> Hi guys, I'm using nginx 1.2 with php-fpm (php 5.3.11). The problem is, the PHP page is delivered as Content-Type: text/html; charset: Windows-1251 I want the charset UTF-8, or at least none at all. I tried putting charset utf-8; or charset off; to...

---

<div class="post-metadata">

**Author:** ![rihad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/a5b964/32.png) [@rihad](https://www.ruby-forum.com/u/rihad)\
**Post date:** [May 25, 2012, 11:11am UTC](https://www.ruby-forum.com/t/charset-utf-8/220036/2 "2012-05-25T11:11:00Z")

</div>

On Fri, May 25, 2012 at 8:05 AM, rihad [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I tried putting charset utf-8; or charset off; to nginx.conf, it didn’t  
> help.

Why not, have you checked the HTTP headers tat are sent? Have you  
checked php.ini? Have you tryed setting headers through PHP’s header()  
ot in meta-tags?

–  
“On the internet, nobody knows you’re a dog.”

---

<div class="post-metadata">

**Author:** ![rihad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/a5b964/32.png) [@rihad](https://www.ruby-forum.com/u/rihad)\
**Post date:** [May 25, 2012, 11:37am UTC](https://www.ruby-forum.com/t/charset-utf-8/220036/3 "2012-05-25T11:37:41Z")

</div>

> Have you tryed setting headers through PHP’s header()

Yes, thanks, it was set up deep in the framework I’m using. Thanks  
again!

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,226822,226825#msg-226825](http://forum.nginx.org/read.php?2,226822,226825#msg-226825)
