Forum: Ruby on Rails How can i give support of multi byte char in my web page

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Fb1c0da5bea28f09050155aed6f2b018?d=identicon&s=25 Yuiji sasaki (Guest)
on 2007-02-20 13:41
Dear guys,
          How can i give support of multi byte char in my web page? What
will be the database configuration? In project has to support Japanese
language?
please give me some idea about it.

Sorry for my poor English.

Sasaki
5f09a4449367c136d3273e4794c2df3f?d=identicon&s=25 Dmitry Solonina (dimas)
on 2007-02-20 20:41
Before database creation, set

Name: some_db_name
Character Set: cp932
Collation: cp932_japanese_ci

if you use MySQL database
5f09a4449367c136d3273e4794c2df3f?d=identicon&s=25 Dmitry Solonina (dimas)
on 2007-02-20 20:48
or try

Character Set: eucjpms
Collation: eucjpms_japanese_ci

I think it is better
Fb1c0da5bea28f09050155aed6f2b018?d=identicon&s=25 Yuiji sasaki (Guest)
on 2007-02-21 03:14
Dmitry Solonina wrote:
> or try
>
> Character Set: eucjpms
> Collation: eucjpms_japanese_ci
>
> I think it is better

Thanks for you response. But still confusion about the following
tropics:

I use ruby on rails 1.8.5.
mysql version 4.1.9.

1. any change in database.yml configuration?

2. What will be the charset in html meta tag?
   suppose I have

   <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    is it right?

please provide some details because I am new in ruby.
thanks in advanced.

Sasaki
5f09a4449367c136d3273e4794c2df3f?d=identicon&s=25 Dmitry Solonina (dimas)
on 2007-02-21 14:42
read about symbols coding on: http://en.wikipedia.org/wiki/EUC

<meta http-equiv="Content-type" content="text/html; charset=euc-jp" />

database.yml don't have any sections about charset support

You need at each section and key database values
change for name your MySQL database name

for example in mysql console create database:

mysql> create database test_db;

development:
  adapter: mysql
  database: test_db
  username: root
  password:
  host: localhost

test:
  adapter: mysql
  database: test_db
  username: root
  password:
  host: localhost

production:
  adapter: mysql
  database: test_db
  username: root
  password:
  host: localhost
Fb1c0da5bea28f09050155aed6f2b018?d=identicon&s=25 Guest (Guest)
on 2007-02-22 04:24
Dmitry Solonina wrote:
> read about symbols coding on: http://en.wikipedia.org/wiki/EUC
>
> <meta http-equiv="Content-type" content="text/html; charset=euc-jp" />
>
> database.yml don't have any sections about charset support
>
> You need at each section and key database values
> change for name your MySQL database name
>
> for example in mysql console create database:
>
> mysql> create database test_db;
>
> development:
>   adapter: mysql
>   database: test_db
>   username: root
>   password:
>   host: localhost

Thanks a lot. It works fine.

Sasaki
This topic is locked and can not be replied to.