On Thu, 24 Apr 2008 07:32:29 +0530
"Arindam Ghosh" <[EMAIL PROTECTED]> wrote:

(Re your other message about trying to meet up, it is not essential
right now. We can try to get together at one of the various FOSS
events in India, or we can have you come visit us at Sarai in Delhi
where we do a fair amount of work on Indian language localisation
issues.)

> 2008/4/24 Mikel Maron <[EMAIL PROTECTED]>:
> 
> >
> > I was only referring to the rendering of characters in the browser, not to
> > the main task to i18n and l10n the rails_port.
> 
> yeah...initially we need to first setup the i18n in the rails_port.

I am attaching some snippets from a document on using Unicode with
RoR that I wrote up for my own benefit while trying to set up a Rails
site with a mysql backend to handle Indian language input. Hopefully
it will be of some help.

> And for now i guess we can trust on mapnik and its' icu library.
[...]

Yes, ICU does a pretty decent job at Indian languages, and Unicode.
I will have to look at Mapnik.

Regards,
Gora
1 To have UTF-8 data in your tables, the following needs to be done
   (see the HowToUseUnicodeStrings on the Ruby Wiki for details):
   (a) Set "encoding: utf8" on all tables in config/database.yml, so
       as to make the Ruby connection to the Mysql database use UTF-8.
   (b) Put the following two lines at the beginning of environment.rb:
         $KCODE = 'u'
         require 'jcode'
   (c) Set up apache for sending UTF-8. Tried various things with
       Apache 1.3, including AddDefaultCharset, through .htaccess,
       etc., finally gave up and switched to Apache 2.2.
   (d) Set up Mysql to handle UTF-8:
       (i) Make the default database charset be UTF-8, and also fix
           collation. In the [mysqld] section of /etc/mysql/my.cnf,
           use:
             default-character-set=utf8
             default-collation=utf8_general_ci
       (ii) Can also force client connections to use UTF-8, but that
           is not always a good idea. See 2(a) for how to ensure that
           the Ruby connections use UTF-8.
       (iii) Ensure that any data entered into the tables are actually
           in UTF-8. E.g., when using the mysql client from a
           terminal, ensure that the terminal itself is set to UTF-8,
           and use:
             set names utf8;
           to make client and connection charsets be UTF-8. Check that
           all is OK, with:
             SHOW VARIABLES LIKE 'character\_set\_%';
           Here is what I get, as an example:
           Here is what I get, as an example:
             +--------------------------+--------+
             | Variable_name            | Value  |
             +--------------------------+--------+
             | character_set_client     | utf8   | 
             | character_set_connection | utf8   | 
             | character_set_database   | utf8   | 
             | character_set_filesystem | binary | 
             | character_set_results    | utf8   | 
             | character_set_server     | utf8   | 
             | character_set_system     | utf8   | 
             +--------------------------+--------+
1 To have UTF-8 data in your tables, the following needs to be done
   (see the HowToUseUnicodeStrings on the Ruby Wiki for details):
   (a) Set "encoding: utf8" on all tables in config/database.yml, so
       as to make the Ruby connection to the Mysql database use UTF-8.
   (b) Put the following two lines at the beginning of environment.rb:
         $KCODE = 'u'
         require 'jcode'
   (c) Set up apache for sending UTF-8. Tried various things with
       Apache 1.3, including AddDefaultCharset, through .htaccess,
       etc., finally gave up and switched to Apache 2.2.
   (d) Set up Mysql to handle UTF-8:
       (i) Make the default database charset be UTF-8, and also fix
           collation. In the [mysqld] section of /etc/mysql/my.cnf,
           use:
             default-character-set=utf8
             default-collation=utf8_general_ci
       (ii) Can also force client connections to use UTF-8, but that
           is not always a good idea. See 2(a) for how to ensure that
           the Ruby connections use UTF-8.
       (iii) Ensure that any data entered into the tables are actually
           in UTF-8. E.g., when using the mysql client from a
           terminal, ensure that the terminal itself is set to UTF-8,
           and use:
             set names utf8;
           to make client and connection charsets be UTF-8. Check that
           all is OK, with:
             SHOW VARIABLES LIKE 'character\_set\_%';
           Here is what I get, as an example:
           Here is what I get, as an example:
             +--------------------------+--------+
             | Variable_name            | Value  |
             +--------------------------+--------+
             | character_set_client     | utf8   | 
             | character_set_connection | utf8   | 
             | character_set_database   | utf8   | 
             | character_set_filesystem | binary | 
             | character_set_results    | utf8   | 
             | character_set_server     | utf8   | 
             | character_set_system     | utf8   | 
             +--------------------------+--------+
1 To have UTF-8 data in your tables, the following needs to be done
   (see the HowToUseUnicodeStrings on the Ruby Wiki for details):
   (a) Set "encoding: utf8" on all tables in config/database.yml, so
       as to make the Ruby connection to the Mysql database use UTF-8.
   (b) Put the following two lines at the beginning of environment.rb:
         $KCODE = 'u'
         require 'jcode'
   (c) Set up apache for sending UTF-8. Tried various things with
       Apache 1.3, including AddDefaultCharset, through .htaccess,
       etc., finally gave up and switched to Apache 2.2.
   (d) Set up Mysql to handle UTF-8:
       (i) Make the default database charset be UTF-8, and also fix
           collation. In the [mysqld] section of /etc/mysql/my.cnf,
           use:
             default-character-set=utf8
             default-collation=utf8_general_ci
       (ii) Can also force client connections to use UTF-8, but that
           is not always a good idea. See 2(a) for how to ensure that
           the Ruby connections use UTF-8.
       (iii) Ensure that any data entered into the tables are actually
           in UTF-8. E.g., when using the mysql client from a
           terminal, ensure that the terminal itself is set to UTF-8,
           and use:
             set names utf8;
           to make client and connection charsets be UTF-8. Check that
           all is OK, with:
             SHOW VARIABLES LIKE 'character\_set\_%';
           Here is what I get, as an example:
           Here is what I get, as an example:
             +--------------------------+--------+
             | Variable_name            | Value  |
             +--------------------------+--------+
             | character_set_client     | utf8   | 
             | character_set_connection | utf8   | 
             | character_set_database   | utf8   | 
             | character_set_filesystem | binary | 
             | character_set_results    | utf8   | 
             | character_set_server     | utf8   | 
             | character_set_system     | utf8   | 
             +--------------------------+--------+
1 To have UTF-8 data in your tables, the following needs to be done
   (see the HowToUseUnicodeStrings on the Ruby Wiki for details):
   (a) Set "encoding: utf8" on all tables in config/database.yml, so
       as to make the Ruby connection to the Mysql database use UTF-8.
   (b) Put the following two lines at the beginning of environment.rb:
         $KCODE = 'u'
         require 'jcode'
   (c) Set up apache for sending UTF-8. Tried various things with
       Apache 1.3, including AddDefaultCharset, through .htaccess,
       etc., finally gave up and switched to Apache 2.2.
   (d) Set up Mysql to handle UTF-8:
       (i) Make the default database charset be UTF-8, and also fix
           collation. In the [mysqld] section of /etc/mysql/my.cnf,
           use:
             default-character-set=utf8
             default-collation=utf8_general_ci
       (ii) Can also force client connections to use UTF-8, but that
           is not always a good idea. See 2(a) for how to ensure that
           the Ruby connections use UTF-8.
       (iii) Ensure that any data entered into the tables are actually
           in UTF-8. E.g., when using the mysql client from a
           terminal, ensure that the terminal itself is set to UTF-8,
           and use:
             set names utf8;
           to make client and connection charsets be UTF-8. Check that
           all is OK, with:
             SHOW VARIABLES LIKE 'character\_set\_%';
           Here is what I get, as an example:
           Here is what I get, as an example:
             +--------------------------+--------+
             | Variable_name            | Value  |
             +--------------------------+--------+
             | character_set_client     | utf8   | 
             | character_set_connection | utf8   | 
             | character_set_database   | utf8   | 
             | character_set_filesystem | binary | 
             | character_set_results    | utf8   | 
             | character_set_server     | utf8   | 
             | character_set_system     | utf8   | 
             +--------------------------+--------+
1 To have UTF-8 data in your tables, the following needs to be done
   (see the HowToUseUnicodeStrings on the Ruby Wiki for details):
   (a) Set "encoding: utf8" on all tables in config/database.yml, so
       as to make the Ruby connection to the Mysql database use UTF-8.
   (b) Put the following two lines at the beginning of environment.rb:
         $KCODE = 'u'
         require 'jcode'
   (c) Set up apache for sending UTF-8. Tried various things with
       Apache 1.3, including AddDefaultCharset, through .htaccess,
       etc., finally gave up and switched to Apache 2.2.
   (d) Set up Mysql to handle UTF-8:
       (i) Make the default database charset be UTF-8, and also fix
           collation. In the [mysqld] section of /etc/mysql/my.cnf,
           use:
             default-character-set=utf8
             default-collation=utf8_general_ci
       (ii) Can also force client connections to use UTF-8, but that
           is not always a good idea. See 2(a) for how to ensure that
           the Ruby connections use UTF-8.
       (iii) Ensure that any data entered into the tables are actually
           in UTF-8. E.g., when using the mysql client from a
           terminal, ensure that the terminal itself is set to UTF-8,
           and use:
             set names utf8;
           to make client and connection charsets be UTF-8. Check that
           all is OK, with:
             SHOW VARIABLES LIKE 'character\_set\_%';
           Here is what I get, as an example:
           Here is what I get, as an example:
             +--------------------------+--------+
             | Variable_name            | Value  |
             +--------------------------+--------+
             | character_set_client     | utf8   | 
             | character_set_connection | utf8   | 
             | character_set_database   | utf8   | 
             | character_set_filesystem | binary | 
             | character_set_results    | utf8   | 
             | character_set_server     | utf8   | 
             | character_set_system     | utf8   | 
             +--------------------------+--------+
1 To have UTF-8 data in your tables, the following needs to be done
   (see the HowToUseUnicodeStrings on the Ruby Wiki for details):
   (a) Set "encoding: utf8" on all tables in config/database.yml, so
       as to make the Ruby connection to the Mysql database use UTF-8.
   (b) Put the following two lines at the beginning of environment.rb:
         $KCODE = 'u'
         require 'jcode'
   (c) Set up apache for sending UTF-8. Tried various things with
       Apache 1.3, including AddDefaultCharset, through .htaccess,
       etc., finally gave up and switched to Apache 2.2.
   (d) Set up Mysql to handle UTF-8:
       (i) Make the default database charset be UTF-8, and also fix
           collation. In the [mysqld] section of /etc/mysql/my.cnf,
           use:
             default-character-set=utf8
             default-collation=utf8_general_ci
       (ii) Can also force client connections to use UTF-8, but that
           is not always a good idea. See 2(a) for how to ensure that
           the Ruby connections use UTF-8.
       (iii) Ensure that any data entered into the tables are actually
           in UTF-8. E.g., when using the mysql client from a
           terminal, ensure that the terminal itself is set to UTF-8,
           and use:
             set names utf8;
           to make client and connection charsets be UTF-8. Check that
           all is OK, with:
             SHOW VARIABLES LIKE 'character\_set\_%';
           Here is what I get, as an example:
           Here is what I get, as an example:
             +--------------------------+--------+
             | Variable_name            | Value  |
             +--------------------------+--------+
             | character_set_client     | utf8   | 
             | character_set_connection | utf8   | 
             | character_set_database   | utf8   | 
             | character_set_filesystem | binary | 
             | character_set_results    | utf8   | 
             | character_set_server     | utf8   | 
             | character_set_system     | utf8   | 
             +--------------------------+--------+
1 To have UTF-8 data in your tables, the following needs to be done
   (see the HowToUseUnicodeStrings on the Ruby Wiki for details):
   (a) Set "encoding: utf8" on all tables in config/database.yml, so
       as to make the Ruby connection to the Mysql database use UTF-8.
   (b) Put the following two lines at the beginning of environment.rb:
         $KCODE = 'u'
         require 'jcode'
   (c) Set up apache for sending UTF-8. Tried various things with
       Apache 1.3, including AddDefaultCharset, through .htaccess,
       etc., finally gave up and switched to Apache 2.2.
   (d) Set up Mysql to handle UTF-8:
       (i) Make the default database charset be UTF-8, and also fix
           collation. In the [mysqld] section of /etc/mysql/my.cnf,
           use:
             default-character-set=utf8
             default-collation=utf8_general_ci
       (ii) Can also force client connections to use UTF-8, but that
           is not always a good idea. See 2(a) for how to ensure that
           the Ruby connections use UTF-8.
       (iii) Ensure that any data entered into the tables are actually
           in UTF-8. E.g., when using the mysql client from a
           terminal, ensure that the terminal itself is set to UTF-8,
           and use:
             set names utf8;
           to make client and connection charsets be UTF-8. Check that
           all is OK, with:
             SHOW VARIABLES LIKE 'character\_set\_%';
           Here is what I get, as an example:
           Here is what I get, as an example:
             +--------------------------+--------+
             | Variable_name            | Value  |
             +--------------------------+--------+
             | character_set_client     | utf8   | 
             | character_set_connection | utf8   | 
             | character_set_database   | utf8   | 
             | character_set_filesystem | binary | 
             | character_set_results    | utf8   | 
             | character_set_server     | utf8   | 
             | character_set_system     | utf8   | 
             +--------------------------+--------+
1 To have UTF-8 data in your tables, the following needs to be done
   (see the HowToUseUnicodeStrings on the Ruby Wiki for details):
   (a) Set "encoding: utf8" on all tables in config/database.yml, so
       as to make the Ruby connection to the Mysql database use UTF-8.
   (b) Put the following two lines at the beginning of environment.rb:
         $KCODE = 'u'
         require 'jcode'
   (c) Set up apache for sending UTF-8. Tried various things with
       Apache 1.3, including AddDefaultCharset, through .htaccess,
       etc., finally gave up and switched to Apache 2.2.
   (d) Set up Mysql to handle UTF-8:
       (i) Make the default database charset be UTF-8, and also fix
           collation. In the [mysqld] section of /etc/mysql/my.cnf,
           use:
             default-character-set=utf8
             default-collation=utf8_general_ci
       (ii) Can also force client connections to use UTF-8, but that
           is not always a good idea. See 2(a) for how to ensure that
           the Ruby connections use UTF-8.
       (iii) Ensure that any data entered into the tables are actually
           in UTF-8. E.g., when using the mysql client from a
           terminal, ensure that the terminal itself is set to UTF-8,
           and use:
             set names utf8;
           to make client and connection charsets be UTF-8. Check that
           all is OK, with:
             SHOW VARIABLES LIKE 'character\_set\_%';
           Here is what I get, as an example:
           Here is what I get, as an example:
             +--------------------------+--------+
             | Variable_name            | Value  |
             +--------------------------+--------+
             | character_set_client     | utf8   | 
             | character_set_connection | utf8   | 
             | character_set_database   | utf8   | 
             | character_set_filesystem | binary | 
             | character_set_results    | utf8   | 
             | character_set_server     | utf8   | 
             | character_set_system     | utf8   | 
             +--------------------------+--------+
1 To have UTF-8 data in your tables, the following needs to be done
   (see the HowToUseUnicodeStrings on the Ruby Wiki for details):
   (a) Set "encoding: utf8" on all tables in config/database.yml, so
       as to make the Ruby connection to the Mysql database use UTF-8.
   (b) Put the following two lines at the beginning of environment.rb:
         $KCODE = 'u'
         require 'jcode'
   (c) Set up apache for sending UTF-8. Tried various things with
       Apache 1.3, including AddDefaultCharset, through .htaccess,
       etc., finally gave up and switched to Apache 2.2.
   (d) Set up Mysql to handle UTF-8:
       (i) Make the default database charset be UTF-8, and also fix
           collation. In the [mysqld] section of /etc/mysql/my.cnf,
           use:
             default-character-set=utf8
             default-collation=utf8_general_ci
       (ii) Can also force client connections to use UTF-8, but that
           is not always a good idea. See 2(a) for how to ensure that
           the Ruby connections use UTF-8.
       (iii) Ensure that any data entered into the tables are actually
           in UTF-8. E.g., when using the mysql client from a
           terminal, ensure that the terminal itself is set to UTF-8,
           and use:
             set names utf8;
           to make client and connection charsets be UTF-8. Check that
           all is OK, with:
             SHOW VARIABLES LIKE 'character\_set\_%';
           Here is what I get, as an example:
           Here is what I get, as an example:
             +--------------------------+--------+
             | Variable_name            | Value  |
             +--------------------------+--------+
             | character_set_client     | utf8   | 
             | character_set_connection | utf8   | 
             | character_set_database   | utf8   | 
             | character_set_filesystem | binary | 
             | character_set_results    | utf8   | 
             | character_set_server     | utf8   | 
             | character_set_system     | utf8   | 
             +--------------------------+--------+
1 To have UTF-8 data in your tables, the following needs to be done
   (see the HowToUseUnicodeStrings on the Ruby Wiki for details):
   (a) Set "encoding: utf8" on all tables in config/database.yml, so
       as to make the Ruby connection to the Mysql database use UTF-8.
   (b) Put the following two lines at the beginning of environment.rb:
         $KCODE = 'u'
         require 'jcode'
   (c) Set up apache for sending UTF-8. Tried various things with
       Apache 1.3, including AddDefaultCharset, through .htaccess,
       etc., finally gave up and switched to Apache 2.2.
   (d) Set up Mysql to handle UTF-8:
       (i) Make the default database charset be UTF-8, and also fix
           collation. In the [mysqld] section of /etc/mysql/my.cnf,
           use:
             default-character-set=utf8
             default-collation=utf8_general_ci
       (ii) Can also force client connections to use UTF-8, but that
           is not always a good idea. See 2(a) for how to ensure that
           the Ruby connections use UTF-8.
       (iii) Ensure that any data entered into the tables are actually
           in UTF-8. E.g., when using the mysql client from a
           terminal, ensure that the terminal itself is set to UTF-8,
           and use:
             set names utf8;
           to make client and connection charsets be UTF-8. Check that
           all is OK, with:
             SHOW VARIABLES LIKE 'character\_set\_%';
           Here is what I get, as an example:
           Here is what I get, as an example:
             +--------------------------+--------+
             | Variable_name            | Value  |
             +--------------------------+--------+
             | character_set_client     | utf8   | 
             | character_set_connection | utf8   | 
             | character_set_database   | utf8   | 
             | character_set_filesystem | binary | 
             | character_set_results    | utf8   | 
             | character_set_server     | utf8   | 
             | character_set_system     | utf8   | 
             +--------------------------+--------+
1 To have UTF-8 data in your tables, the following needs to be done
   (see the HowToUseUnicodeStrings on the Ruby Wiki for details):
   (a) Set "encoding: utf8" on all tables in config/database.yml, so
       as to make the Ruby connection to the Mysql database use UTF-8.
   (b) Put the following two lines at the beginning of environment.rb:
         $KCODE = 'u'
         require 'jcode'
   (c) Set up apache for sending UTF-8. Tried various things with
       Apache 1.3, including AddDefaultCharset, through .htaccess,
       etc., finally gave up and switched to Apache 2.2.
   (d) Set up Mysql to handle UTF-8:
       (i) Make the default database charset be UTF-8, and also fix
           collation. In the [mysqld] section of /etc/mysql/my.cnf,
           use:
             default-character-set=utf8
             default-collation=utf8_general_ci
       (ii) Can also force client connections to use UTF-8, but that
           is not always a good idea. See 2(a) for how to ensure that
           the Ruby connections use UTF-8.
       (iii) Ensure that any data entered into the tables are actually
           in UTF-8. E.g., when using the mysql client from a
           terminal, ensure that the terminal itself is set to UTF-8,
           and use:
             set names utf8;
           to make client and connection charsets be UTF-8. Check that
           all is OK, with:
             SHOW VARIABLES LIKE 'character\_set\_%';
           Here is what I get, as an example:
           Here is what I get, as an example:
             +--------------------------+--------+
             | Variable_name            | Value  |
             +--------------------------+--------+
             | character_set_client     | utf8   | 
             | character_set_connection | utf8   | 
             | character_set_database   | utf8   | 
             | character_set_filesystem | binary | 
             | character_set_results    | utf8   | 
             | character_set_server     | utf8   | 
             | character_set_system     | utf8   | 
             +--------------------------+--------+
1 To have UTF-8 data in your tables, the following needs to be done
   (see the HowToUseUnicodeStrings on the Ruby Wiki for details):
   (a) Set "encoding: utf8" on all tables in config/database.yml, so
       as to make the Ruby connection to the Mysql database use UTF-8.
   (b) Put the following two lines at the beginning of environment.rb:
         $KCODE = 'u'
         require 'jcode'
   (c) Set up apache for sending UTF-8. Tried various things with
       Apache 1.3, including AddDefaultCharset, through .htaccess,
       etc., finally gave up and switched to Apache 2.2.
   (d) Set up Mysql to handle UTF-8:
       (i) Make the default database charset be UTF-8, and also fix
           collation. In the [mysqld] section of /etc/mysql/my.cnf,
           use:
             default-character-set=utf8
             default-collation=utf8_general_ci
       (ii) Can also force client connections to use UTF-8, but that
           is not always a good idea. See 2(a) for how to ensure that
           the Ruby connections use UTF-8.
       (iii) Ensure that any data entered into the tables are actually
           in UTF-8. E.g., when using the mysql client from a
           terminal, ensure that the terminal itself is set to UTF-8,
           and use:
             set names utf8;
           to make client and connection charsets be UTF-8. Check that
           all is OK, with:
             SHOW VARIABLES LIKE 'character\_set\_%';
           Here is what I get, as an example:
           Here is what I get, as an example:
             +--------------------------+--------+
             | Variable_name            | Value  |
             +--------------------------+--------+
             | character_set_client     | utf8   | 
             | character_set_connection | utf8   | 
             | character_set_database   | utf8   | 
             | character_set_filesystem | binary | 
             | character_set_results    | utf8   | 
             | character_set_server     | utf8   | 
             | character_set_system     | utf8   | 
             +--------------------------+--------+
1 To have UTF-8 data in your tables, the following needs to be done
   (see the HowToUseUnicodeStrings on the Ruby Wiki for details):
   (a) Set "encoding: utf8" on all tables in config/database.yml, so
       as to make the Ruby connection to the Mysql database use UTF-8.
   (b) Put the following two lines at the beginning of environment.rb:
         $KCODE = 'u'
         require 'jcode'
   (c) Set up apache for sending UTF-8. Tried various things with
       Apache 1.3, including AddDefaultCharset, through .htaccess,
       etc., finally gave up and switched to Apache 2.2.
   (d) Set up Mysql to handle UTF-8:
       (i) Make the default database charset be UTF-8, and also fix
           collation. In the [mysqld] section of /etc/mysql/my.cnf,
           use:
             default-character-set=utf8
             default-collation=utf8_general_ci
       (ii) Can also force client connections to use UTF-8, but that
           is not always a good idea. See 2(a) for how to ensure that
           the Ruby connections use UTF-8.
       (iii) Ensure that any data entered into the tables are actually
           in UTF-8. E.g., when using the mysql client from a
           terminal, ensure that the terminal itself is set to UTF-8,
           and use:
             set names utf8;
           to make client and connection charsets be UTF-8. Check that
           all is OK, with:
             SHOW VARIABLES LIKE 'character\_set\_%';
           Here is what I get, as an example:
           Here is what I get, as an example:
             +--------------------------+--------+
             | Variable_name            | Value  |
             +--------------------------+--------+
             | character_set_client     | utf8   | 
             | character_set_connection | utf8   | 
             | character_set_database   | utf8   | 
             | character_set_filesystem | binary | 
             | character_set_results    | utf8   | 
             | character_set_server     | utf8   | 
             | character_set_system     | utf8   | 
             +--------------------------+--------+
2. To use gettext for native language support, see various links that
   can be found through Google (e.g., search for "rails ruby gettext")
   These seem like good starting points:
     http://www.yotabanana.com/hiki/ruby-gettext-howto-rails.html
     http://manuals.rubyonrails.com/read/chapter/105
   I remember that I tried setting up a RoR site with gettext, but
   cannot now remember how far I got. If you try these, and get
   stuck, I can try to help out.
_______________________________________________
dev mailing list
[email protected]
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev

Reply via email to