Hi, I developing a web application using ruby on rails, apache 2.2.3 and Mysql. I want to handle the unicode characters(chinese, japanese etc.) in my application. I have made the necessary configuration in application.rb , environment.rb and database.yml and .htaccess files. Also I am using encodeURIComponent fuction on javascript to escape the querystrigs. http://wiki.rubyonrails.org/rails/pages/HowToUseUnicodeStrings Now I am able to store the unicode characters in the Mysql database with utf8 charset when I use webrick server. But with apache I am getting ???????(question marks) or illegal characters in the databas. Can anybody help for handling the unicode charactes using Apache. I am also using AddDefaultCharset utf8 in httpd.conf as well in .htaccess file. Thanks Hitesh --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I am using Apache with mongrel cluster. On Oct 10, 3:57 pm, Hitesh <kathuria.hit...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > I developing a web application using ruby on rails, apache 2.2.3 and > Mysql. I want to handle the unicode characters(chinese, japanese etc.) > in my application. > > I have made the necessary configuration in application.rb , > environment.rb and database.yml and .htaccess files. Also I am using > encodeURIComponent fuction on javascript to escape the querystrigs. > > http://wiki.rubyonrails.org/rails/pages/HowToUseUnicodeStrings > > Now I am able to store the unicode characters in the Mysql database > with utf8 charset when I use webrick server. > > But with apache I am getting ???????(question marks) or illegal > characters in the databas. > > Can anybody help for handling the unicode charactes using Apache. > > I am also using AddDefaultCharset utf8 in httpd.conf as well > in .htaccess file. > > Thanks > > Hitesh--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hitesh wrote:> Hi, > > I developing a web application using ruby on rails, apache 2.2.3 and > Mysql. I want to handle the unicode characters(chinese, japanese etc.) > in my application. > > I have made the necessary configuration in application.rb , > environment.rb and database.yml and .htaccess files. Also I am using > encodeURIComponent fuction on javascript to escape the querystrigs. > > http://wiki.rubyonrails.org/rails/pages/HowToUseUnicodeStrings > > Now I am able to store the unicode characters in the Mysql database > with utf8 charset when I use webrick server. > > But with apache I am getting ???????(question marks) or illegal > characters in the databas. > > Can anybody help for handling the unicode charactes using Apache. > > I am also using AddDefaultCharset utf8 in httpd.conf as well > in .htaccess file. > > Thanks > > HiteshAre you setting something like this in your HTML files?: <meta http-equiv="content-type" content="text/html; charset=utf-8" /> How are you connecting Apache to your Rails app? -- Michael Wang --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Yes Michael, I am setting <meta http-equiv="content-type"
content="text/html; charset=utf-8" /> in my html files.
I made following entry in httpd.conf file for hosting my application
on apache.
<VirtualHost *:80>
ServerName 172.16.0.144
ServerAlias 172.16.0.144
Include conf/extra/myapp.common
</VirtualHost>
<Proxy balancer://mongrel_cluster>
BalancerMember http://127.0.0.1:8000
BalancerMember http://127.0.0.1:8001
BalancerMember http://127.0.0.1:8002
BalancerMember http://127.0.0.1:8003
BalancerMember http://127.0.0.1:8004
BalancerMember http://127.0.0.1:8005
BalancerMember http://127.0.0.1:8006
BalancerMember http://127.0.0.1:8007
BalancerMember http://127.0.0.1:8008
BalancerMember http://127.0.0.1:8009
</Proxy>
-----------------Content of myapp.common include file
--------------------------------------------
DocumentRoot /home/YouSearch/public
<Directory "/home/YouSearch/public">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
RewriteEngine On
RewriteRule ^/$ /index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI}
[P,QSA,L]
AddOutputFilterByType DEFLATE text/html text/plain text/css
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
--------------------------------------------------------------------------------------------------------------------
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---