search for: configure_charset

Displaying 7 results from an estimated 7 matches for "configure_charset".

Did you mean: configure_charsets
2006 May 19
1
database.yml and encoding: utf8 -> mysql error
...arsets/Index'' file rake aborted! Can''t initialize character set utf8 (path: /usr/local/mysql/share/mysql/charsets/) First thought that I was missing the charset but it was ok. Then I removed encoding: utf8 and added the following to my application controller: before_filter :configure_charsets def configure_charsets headers["Content-Type"] = "text/html; charset=utf-8" ActiveRecord::Base.connection.execute ''SET NAMES UTF8'' end This then works fine. Has anyone else encountered the same or have a solution? -- Posted via http://www.ruby...
2007 Jan 18
4
Problem with encoding - characters such as öäü
...ying to use german characters on a ruby on rails application, but for get ? on dropwdown menus. The database, tables and fields are encoded utf8_general_ci. I have this in my application controller: class ApplicationController < ActionController::Base before_filter :set_charset before_filter :configure_charsets def set_charset @headers["Content-Type"] = "text/html; charset=utf-8" end def configure_charsets @response.headers["Content-Type"] = "text/html; charset=utf-8" end end This in my environment.rb: ActiveRecord::Base.connection.execute ''SET NAMES...
2005 Dec 09
1
utf-8 BIG problems
...also import from csv, characters like éàï.... But the display is then fucked up. i get wierd symbols ------------------- Another situation: I have seen a post here to add to environment.rb: $KCODE = ''UTF8'' require ''jcode'' and to application.rb: before_filter :configure_charsets after_filter :fix_unicode_for_safari def parse_errors(obj) return nil if obj.nil? str = "<ul>" obj.errors.each_full do |msg| str += "<li>" + msg +"</li>" end str += "</ul>" return str end def configu...
2006 Apr 08
16
International characters
I am new to Ruby on Rails. I have read a lot, and bought several books, and now I have started to implement a modified "shopping cart", following the AWDWR-book, with modifications to suit our application (subscriptions and memberships). Having done up to chapter 7 I have had no real problems, except one: Since our customers are Swedish I need the screen names, texts etc to be in
2006 Aug 07
3
character encoding in RoR
Hi, I''m a newcomer to Ruby and to Rails, and am having a problem with character encoding. Now, I know ruby doesn''t handle unicode...but, characters like ? (eacute) and ? (ccedil) are part of the iso-8859-1 charset, so it shouldn''t be a problem, right? But, for some reason, the string functions still seem to hang on those characters. As an example, in a brand new rails
2006 Jun 25
7
Unicode HOWTO?
I am disappointed about the (seeming) lack of Unicode support in Rails. Is there a howto about working the most important limitations? For example, figuring out the length of an entered word: "???".length() will return 6, not 3. So if there is a maximum number of characters a user is allowed to enter, this won''t work as it should -- it treats strings as byte arrays instead
2006 Mar 10
3
WML sites
Hi all how to make a WML view for rails pages? I''ve tried to create like: <wml> <card> CONTENT </card> </wml> but my phone says unsupported content type... thanks -- Posted via http://www.ruby-forum.com/.