Re: [nyphp-talk] UTF-8, databases and best practices

2012-06-08 Thread Eugenio
2012/5/23 Hans Zaunere I'd be interested to hear other's thoughts, but the general consensus these > days is "convert all to UTF-8". Is there an application-requirement-reason > that you'd need to convert data to a different charset at different times? > > In general: > > 1. Raw data (any charse

Re: [nyphp-talk] UTF-8, databases and best practices

2012-05-24 Thread Eugenio Tacchini
>> 2) How to handle the fact that the data I receive from the database >> can be stored using any possible charset? Do I need iconv functions >> and convert everything in utf-8? And then convert it back in the >> original charset when I have to write to the DB? > > I'd be interested to hear other's

Re: [nyphp-talk] UTF-8, databases and best practices

2012-05-23 Thread Anirudhsinh Zala
On Wednesday 23 May 2012 20:41:15 Eugenio Tacchini wrote: > Hi all, > I need to distribute an application that potentially can be used with > many different DBMSs (such as MySQL, PostgreSQL, SQLite, Microsoft SQL > Server). The charset used in the databases can be ANY. > > I would like to always o

Re: [nyphp-talk] UTF-8, databases and best practices

2012-05-23 Thread Rob Marscher
On May 23, 2012, at 3:32 PM, Hans Zaunere wrote: > So obviously having output before doctype isn't what's supposed to happen, > though it does, and when it does and Firefox suddenly makes double requests > for no reason, it's really difficult to pin down. Anyone else see anything > like this? I h

Re: [nyphp-talk] UTF-8, databases and best practices

2012-05-23 Thread Ronald Bradford
My Recommendations. I use this successfully in several multiple language projects. # my.cnf [mysqld] default_character_set = utf8 character_set_client = utf8 character_set_server = utf8 [client] default_character_set = utf8 #php.ini default_charset = "utf-8" #httpd.conf AddDefaultCh

Re: [nyphp-talk] UTF-8, databases and best practices

2012-05-23 Thread Hans Zaunere
> Yes about point 4: save your PHP file in UTF-8 and add the encoding to > your HTML > > > obvious things that can make you lose hours of deugging This actually brings up a good point/question that I've had. I commonly use HTML 5 boilerplate, and they too have a similar meta tag as above to set

Re: [nyphp-talk] UTF-8, databases and best practices

2012-05-23 Thread Federico Ulfo
Yes about point 4: save your PHP file in UTF-8 and add the encoding to your HTML obvious things that can make you lose hours of deugging On Wed, May 23, 2012 at 1:25 PM, Hans Zaunere wrote: > Hi Eugenio, > > > I need to distribute an application that potentially can be used with > > many diffe

Re: [nyphp-talk] UTF-8, databases and best practices

2012-05-23 Thread Hans Zaunere
Hi Eugenio, > I need to distribute an application that potentially can be used with > many different DBMSs (such as MySQL, PostgreSQL, SQLite, Microsoft SQL > Server). The charset used in the databases can be ANY. > > I would like to always output UTF-8 text when possible and my > questions are a