php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #41168 Default Charset problem for MySQL
Submitted: 2007-04-23 03:12 UTC Modified: 2007-04-23 07:06 UTC
From: roleroz at gmail dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS: Gentoo Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: roleroz at gmail dot com
New email:
PHP Version: OS:

 

 [2007-04-23 03:12 UTC] roleroz at gmail dot com
Description:
------------
At the documentation it says that the default charset for mysql is latin, but in my system that doesn't seem to be right.

After checking lots of posibilities, i set the mysql.connect_charset variable, at php.ini, to latin1, and my code finally worked

It seems that the default charset for mysql functions in php 5.2.1 running over apache2 it's utf8


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-04-23 03:29 UTC] ljbuesch at purdue dot edu
From the MySQL manual (http://dev.mysql.com/doc/refman/5.0/en/charset-syntax.html):
---
By default, MySQL uses the latin1 (cp1252 West European) character set and the latin1_swedish_ci collation that sorts according to Swedish/Finnish rules. These defaults are suitable for the United States and most of Western Europe.
---

Your system must be compiled to not use latin1, but it is in no way a PHP documentation problem.
 [2007-04-23 07:06 UTC] derick@php.net
File a report with the Gentoo maintainers for doing something not standard (again).
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Aug 04 10:00:02 2025 UTC