hey guys,
Does anyone know why the french letter “é” is displayed as a question
mark “?” inside an
hey guys,
Does anyone know why the french letter “é” is displayed as a question
mark “?” inside an
check your character eoncoding header…
On Wednesday, March 22, 2006, at 6:41 PM, weirdmonkey wrote:
http://lists.rubyonrails.org/mailman/listinfo/rails
Mikkel B.
www.strongside.dk - Football Portal(DK)
nflfeed.helenius.org - Football News(DK)
ting.minline.dk - Buy Old Stuff!(DK)
Does anyone know why the french letter “é” is displayed as a question
mark “?” inside antag ?
utf8/latin1 characterset?
regards
Claus
Add this to app/controllers/application.rb. You may need to replace
iso-8859-1 with something else like utf8…
class ApplicationController < ActionController::Base
…
after_filter :set_charset
def set_charset
@headers[“Content-Type”] ||= “text/html; charset=iso-8859-1”
end
end
I have the same type of problems sometimes. Will there be problems for
some users if I switch my charecter encoding to utf8?
On Wed, 2006-03-22 at 19:10 +0100, Martin Bernd S. wrote:
end
end
- Bernd
Charlie B.
Programmer
Castle Branch Inc.
Try using the h() function. It should change most characters to web
friendly characters.
Ex.
<%= h(“text goes here”) %>
-John
–
John S.
Computing Staff - Webmaster
Kavli Institute for Theoretical Physics
University of California, Santa Barbara
[email protected]
(805) 893-6307
here is my code for my list.rhtml :
<% for livre in @livres %>
<%= link_to ‘Nouveau livre’, :action => ‘new’ %>
everything that comes for the db displays fine, it is just Ruby
generated content that displays weird.
John, can you edit my code just to see how to implent it (i’m a big
beginner)
Thank you
Same problem with utf8…
here a pic: http://img214.imageshack.us/img214/1517/rordisplay2qj.jpg
Do I need to configure the MySQL fields with the utf8 charset ?
<% for livre in @livres %>
<% for livre in @livres %>
This will reduce a few unnecessary calls to h().
-John
–
John S.
Computing Staff - Webmaster
Kavli Institute for Theoretical Physics
University of California, Santa Barbara
[email protected]
(805) 893-6307
John S. wrote:
Try this…
<%= h("Livres entrés dans MySQL") %>
<% for livre in @livres %>
<%= h(livre.titre) %>: <%= link_to 'Afficher', :action =>…
-John
–
John S.
Computing Staff - Webmaster
Kavli Institute for Theoretical Physics
University of California, Santa Barbara
[email protected]
(805) 893-6307Thank you!
Problem fixed!
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs