This is a discussion on Help - MySQL Inconsistency within the MySQL Database forums, part of the Database Forums category; I'm running a web app with MySQL 5.041-community-nt on my web server and on my development ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I'm running a web app with MySQL 5.041-community-nt on my web server and on
my development machine. Both environments run Apache 2.2., Windows XP, OS: Windows XP, Python 2.3. There might be a configuration difference between systems, but I've been fairly consciencious about keep them in synch. I'm going for an end-to-end UTF8 web implementation. On my server, when I put strings into my MySQL database I have to encode them UTF8. On my development machine, I don't. I prefer the development environment 'cause it makes for smaller, simpler code ... which then doesn't work on my server. It's making life murder for debugging before releasing. Does anybody have an idea what might be causing this? |
|
|||
|
"weheh" <weheh@verizon.net> wrote in news:Jf%9j.3651$Uq4.1118@trnddc06:
> I'm running a web app with MySQL 5.041-community-nt on my web server > and on my development machine. Both environments run Apache 2.2., > Windows XP, OS: Windows XP, Python 2.3. There might be a configuration > difference between systems, but I've been fairly consciencious about > keep them in synch. > > I'm going for an end-to-end UTF8 web implementation. On my server, > when I put strings into my MySQL database I have to encode them UTF8. > On my development machine, I don't. I prefer the development > environment 'cause it makes for smaller, simpler code ... which then > doesn't work on my server. It's making life murder for debugging > before releasing. > > Does anybody have an idea what might be causing this? Take a look at my.cnf or similar and make sure the following lines are there under [mysqld], well at least the first: character-set-server=utf8 default-collation=utf8_unicode_ci default-character-set=utf8 |
|
|||
|
> I'm going for an end-to-end UTF8 web implementation. On my server, when I
> put strings into my MySQL database I have to encode them UTF8. On my > development machine, I don't. You'll have to inform MySQL what encoding you use. If you have a buch of strings in, say, latin-1, send a "SET NAMES latin1" command to the server and do your INSERTs and UPDATEs. If you have a bunch of utf8 strings, use "SET NAMES utf8". Good luck, -- Willem Bogaerts Application smith Kratz B.V. http://www.kratz.nl/ |
|
|||
|
I always do a SET NAMES utf8 before inserting or selecting anything from the
db. "Willem Bogaerts" <w.bogaerts@kratz.maardanzonderditstuk.nl> wrote in message news:4768db2c$0$85787$e4fe514c@news.xs4all.nl... >> I'm going for an end-to-end UTF8 web implementation. On my server, when I >> put strings into my MySQL database I have to encode them UTF8. On my >> development machine, I don't. > > You'll have to inform MySQL what encoding you use. If you have a buch of > strings in, say, latin-1, send a "SET NAMES latin1" command to the > server and do your INSERTs and UPDATEs. If you have a bunch of utf8 > strings, use "SET NAMES utf8". > > Good luck, > -- > Willem Bogaerts > > Application smith > Kratz B.V. > http://www.kratz.nl/ |