Thanks. So now that I've got everything configured correctly, I shouldn't
have to worry about curly quotes because Cake will convert them to straight
for me? No string manipulation needed inside of my app?


On Sun, Oct 5, 2008 at 10:12 PM, David C. Zentgraf <[EMAIL PROTECTED]> wrote:

>
> class DATABASE_CONFIG {
>        var $default = array(
>                'driver' => 'mysql',
>                ...
>                'encoding' => 'utf8'
>        );
> }
>
> I forget to put that in on a regular basis and it always costs my a
> few minutes of debugging. ;-)
> Not sure why it's not in the default template.
>
> On 6 Oct 2008, at 10:24, Ryan wrote:
>
> >
> > Hey Adam, thanks. Here's how I'm setup:
> >
> > core.php
> > Configure::write('App.encoding', 'UTF-8')
> >
> > database.php
> > (I don't see a place to specify UTF-8)
> >
> > MySQL
> > utf8_general_ci
> >
> > default.ctp (head section)
> > <?php echo $html->charset('UTF-8') ?>
> >
> > Am I missing anything?
> >
> > When you say to make sure all of my code is utf8 compliant (eg string
> > conversions), what do you mean? Can you be more specific?
> >
> > I think users of my site are entering curly quotes, which are saved to
> > the db, then come out as garbage when displayed in HTML.
> >
> > -Ryan
> >
> >
> > On Sep 30, 9:05 pm, Adam Royle <[EMAIL PROTECTED]> wrote:
> >> If your database is correctly setup as utf8, cakephp db settings as
> >> utf8 and your html is output as utf8, and make sure all of your code
> >> is utf8 compliant (eg string conversion, etc) then you shouldn't have
> >> any issues. Unless you just don't like the look of curly quotes?
> >>
> >> Cheers,
> >> Adam
> >>
> >> On Oct 1, 8:39 am, Ryan <[EMAIL PROTECTED]> wrote:
> >>
> >>> I'm using a UTF-8 character set and the curly single and double
> >>> quotes
> >>> are causing some problems with my app. I have a couple of questions
> >>> regarding the best way to deal with (eliminate) them:
> >>
> >>> Allow the curly quotes to go into the database, but convert them to
> >>> straight quotes before display? Or convert them into straight quotes
> >>> before going into the database?
> >>
> >>> And beyond that fundamental issue, what is the best way to convert
> >>> from curly to straight? I've dealt with similar issues in some of my
> >>> non-Cake PHP applications and am wondering if Cake has any built-in
> >>> functionality for dealing.
> >>
> >>> Thanks!
> > >
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to