Frederic Do Couto
2007-Apr-17 18:52 UTC
[Mongrel] How to change the default encoding for dynamic pages
Hello, I''m trying to write a rails application serves by mongrel and using accentuated characters in the .rhtml page. But Mongrel replace them by ''?'' . It works fine for static pages by defining the charset to iso-8859-1 in the mongrel_mime.yml But how to change the default encoding (seems to be UTF-8) for the dynamic pages ? thanks for your help. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070417/fd6be7fc/attachment-0001.html
Jack Baty
2007-Apr-17 18:59 UTC
[Mongrel] How to change the default encoding for dynamic pages
Is this a Rails thing settable in environment.rb?
ActionController::Base.default_charset=("UTF-8")
Although I think as of Rails 1.2 UTF-8 is the default. I hate encoding
issues, as I never really know what''s "in charge."
--
--------------------------------------------------------------------------------
Jack Baty http://jackbaty.com/ (616) 822-5800
Fusionary http://fusionary.com/ (616) 454-2357
820 Monroe N.W. Suite 212
Grand Rapids, MI 49503
On 4/17/07, Frederic Do Couto <fredsubs at gmail.com>
wrote:> Hello,
>
> I''m trying to write a rails application serves by mongrel and
using
> accentuated characters in the .rhtml page. But Mongrel replace them by
''?'' .
>
> It works fine for static pages by defining the charset to iso-8859-1 in the
> mongrel_mime.yml
>
> But how to change the default encoding (seems to be UTF-8) for the dynamic
> pages ?
>
> thanks for your help.
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
>
Frederic Do Couto
2007-Apr-17 19:17 UTC
[Mongrel] How to change the default encoding for dynamic pages
thank you, it works.
i''ve added this line
ActionController::Base.default_charset=("ISO-8859-1")
in the environment.rb.
i''ve tried with the iso-8859-15 to have the ? (euro) symbol but it
doesn t
work. If you have another good idea ? ;)
thanks
On 4/17/07, Jack Baty <jbaty at fusionary.com>
wrote:>
> Is this a Rails thing settable in environment.rb?
>
> ActionController::Base.default_charset=("UTF-8")
>
> Although I think as of Rails 1.2 UTF-8 is the default. I hate encoding
> issues, as I never really know what''s "in charge."
>
>
> --
>
>
--------------------------------------------------------------------------------
> Jack Baty http://jackbaty.com/ (616) 822-5800
> Fusionary http://fusionary.com/ (616) 454-2357
> 820 Monroe N.W. Suite 212
> Grand Rapids, MI 49503
>
>
> On 4/17/07, Frederic Do Couto <fredsubs at gmail.com> wrote:
> > Hello,
> >
> > I''m trying to write a rails application serves by mongrel and
using
> > accentuated characters in the .rhtml page. But Mongrel replace them by
> ''?'' .
> >
> > It works fine for static pages by defining the charset to iso-8859-1
in
> the
> > mongrel_mime.yml
> >
> > But how to change the default encoding (seems to be UTF-8) for the
> dynamic
> > pages ?
> >
> > thanks for your help.
> > _______________________________________________
> > Mongrel-users mailing list
> > Mongrel-users at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/mongrel-users
> >
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://rubyforge.org/pipermail/mongrel-users/attachments/20070417/a4b07ec6/attachment.html
Kyle Kochis
2007-Apr-17 21:05 UTC
[Mongrel] How to change the default encoding for dynamic pages
Are you encoding the symbols properly with html entities? That may be stupid question but I wanted to make sure. Most systems/browsers don''t know what to do with weird (or not so weird) symbols even if they are valid in the document encoding. Kyle On 4/17/07, Frederic Do Couto <fredsubs at gmail.com> wrote:> > thank you, it works. > > i''ve added this line ActionController::Base.default_charset=("ISO-8859-1") > in the environment.rb. > > i''ve tried with the iso-8859-15 to have the ? (euro) symbol but it doesn t > work. If you have another good idea ? ;) > > thanks > > On 4/17/07, Jack Baty <jbaty at fusionary.com> wrote: > > > > Is this a Rails thing settable in environment.rb? > > > > ActionController::Base.default_charset=("UTF-8") > > > > Although I think as of Rails 1.2 UTF-8 is the default. I hate encoding > > issues, as I never really know what''s "in charge." > > > > > > -- > > > > -------------------------------------------------------------------------------- > > Jack Baty http://jackbaty.com/ (616) 822-5800 > > Fusionary http://fusionary.com/ (616) 454-2357 > > 820 Monroe N.W. Suite 212 > > Grand Rapids, MI 49503 > > > > > > On 4/17/07, Frederic Do Couto <fredsubs at gmail.com > wrote: > > > Hello, > > > > > > I''m trying to write a rails application serves by mongrel and using > > > accentuated characters in the .rhtml page. But Mongrel replace them by > > ''?'' . > > > > > > It works fine for static pages by defining the charset to iso-8859-1 > > in the > > > mongrel_mime.yml > > > > > > But how to change the default encoding (seems to be UTF-8) for the > > dynamic > > > pages ? > > > > > > thanks for your help. > > > _______________________________________________ > > > Mongrel-users mailing list > > > Mongrel-users at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > _______________________________________________ > > Mongrel-users mailing list > > Mongrel-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070417/10c54ddf/attachment.html
Frederic Do Couto
2007-Apr-18 07:01 UTC
[Mongrel] How to change the default encoding for dynamic pages
Hi, Sure I can use the € html entity but i''m looking way to the ? symbole directly in the source code. Thank you On 4/17/07, Kyle Kochis <kylekochis at gmail.com> wrote:> > Are you encoding the symbols properly with html entities? That may be > stupid question but I wanted to make sure. Most systems/browsers don''t know > what to do with weird (or not so weird) symbols even if they are valid in > the document encoding. > Kyle > > On 4/17/07, Frederic Do Couto <fredsubs at gmail.com> wrote: > > > > thank you, it works. > > > > i''ve added this line ActionController::Base.default_charset=("ISO-8859-1") > > in the environment.rb. > > > > i''ve tried with the iso-8859-15 to have the ? (euro) symbol but it doesn > > t work. If you have another good idea ? ;) > > > > thanks > > > > On 4/17/07, Jack Baty < jbaty at fusionary.com> wrote: > > > > > > Is this a Rails thing settable in environment.rb? > > > > > > ActionController::Base.default_charset=("UTF-8") > > > > > > Although I think as of Rails 1.2 UTF-8 is the default. I hate encoding > > > issues, as I never really know what''s "in charge." > > > > > > > > > -- > > > > > > -------------------------------------------------------------------------------- > > > Jack Baty http://jackbaty.com/ (616) 822-5800 > > > Fusionary http://fusionary.com/ (616) 454-2357 > > > 820 Monroe N.W. Suite 212 > > > Grand Rapids, MI 49503 > > > > > > > > > On 4/17/07, Frederic Do Couto < fredsubs at gmail.com > wrote: > > > > Hello, > > > > > > > > I''m trying to write a rails application serves by mongrel and using > > > > accentuated characters in the .rhtml page. But Mongrel replace them > > > by ''?'' . > > > > > > > > It works fine for static pages by defining the charset to iso-8859-1 > > > in the > > > > mongrel_mime.yml > > > > > > > > But how to change the default encoding (seems to be UTF-8) for the > > > dynamic > > > > pages ? > > > > > > > > thanks for your help. > > > > _______________________________________________ > > > > Mongrel-users mailing list > > > > Mongrel-users at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > > > _______________________________________________ > > > Mongrel-users mailing list > > > Mongrel-users at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > > > > > _______________________________________________ > > Mongrel-users mailing list > > Mongrel-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070418/f896b940/attachment.html
Frederic Do Couto
2007-Apr-18 07:14 UTC
[Mongrel] How to change the default encoding for dynamic pages
Hi, Sure I can use the € html entity but i''m looking way to the ? symbole directly in the source code. Thank you On 4/17/07, Kyle Kochis <kylekochis at gmail.com> wrote:> > Are you encoding the symbols properly with html entities? That may be > stupid question but I wanted to make sure. Most systems/browsers don''t know > what to do with weird (or not so weird) symbols even if they are valid in > the document encoding. > Kyle > > On 4/17/07, Frederic Do Couto <fredsubs at gmail.com> wrote: > > > > thank you, it works. > > > > i''ve added this line ActionController::Base.default_charset=("ISO-8859-1") > > in the environment.rb. > > > > i''ve tried with the iso-8859-15 to have the ? (euro) symbol but it doesn > > t work. If you have another good idea ? ;) > > > > thanks > > > > On 4/17/07, Jack Baty < jbaty at fusionary.com> wrote: > > > > > > Is this a Rails thing settable in environment.rb? > > > > > > ActionController::Base.default_charset=("UTF-8") > > > > > > Although I think as of Rails 1.2 UTF-8 is the default. I hate encoding > > > issues, as I never really know what''s "in charge." > > > > > > > > > -- > > > > > > -------------------------------------------------------------------------------- > > > Jack Baty http://jackbaty.com/ (616) 822-5800 > > > Fusionary http://fusionary.com/ (616) 454-2357 > > > 820 Monroe N.W. Suite 212 > > > Grand Rapids, MI 49503 > > > > > > > > > On 4/17/07, Frederic Do Couto < fredsubs at gmail.com > wrote: > > > > Hello, > > > > > > > > I''m trying to write a rails application serves by mongrel and using > > > > accentuated characters in the .rhtml page. But Mongrel replace them > > > by ''?'' . > > > > > > > > It works fine for static pages by defining the charset to iso-8859-1 > > > in the > > > > mongrel_mime.yml > > > > > > > > But how to change the default encoding (seems to be UTF-8) for the > > > dynamic > > > > pages ? > > > > > > > > thanks for your help. > > > > _______________________________________________ > > > > Mongrel-users mailing list > > > > Mongrel-users at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > > > _______________________________________________ > > > Mongrel-users mailing list > > > Mongrel-users at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > > > > > _______________________________________________ > > Mongrel-users mailing list > > Mongrel-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070418/173c7c42/attachment-0001.html