# Mixing english and japanese in DB?

**URL:** <https://www.ruby-forum.com/t/mixing-english-and-japanese-in-db/79072>\
**Category:** Rails\
**Created:** [December 12, 2006, 12:35am UTC](https://www.ruby-forum.com/t/mixing-english-and-japanese-in-db/79072 "2006-12-12T00:35:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![taylorstrait](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b5a626/32.png) [@taylorstrait](https://www.ruby-forum.com/u/taylorstrait)\
**Post date:** [December 12, 2006, 12:35am UTC](https://www.ruby-forum.com/t/mixing-english-and-japanese-in-db/79072/1 "2006-12-12T00:35:38Z")

</div>

I want user to be able to input various flooring types for their rooms.  
Ideally, I would like to use a pulldown (and validation) so that there  
are a few consistent options. One of these options, though, is Japanese  
‘tatami’ flooring (ç•³). Is there any reason NOT to store this in the  
database as ‘ç•³’ instead of ‘tatami?’ Or should I just wait until I  
integrate the Globalize plugin?

---

<div class="post-metadata">

**Author:** ![taylorstrait](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b5a626/32.png) [@taylorstrait](https://www.ruby-forum.com/u/taylorstrait)\
**Post date:** [December 12, 2006, 1:34am UTC](https://www.ruby-forum.com/t/mixing-english-and-japanese-in-db/79072/2 "2006-12-12T01:34:38Z")

</div>

Taylor S. wrote:

> I want user to be able to input various flooring types for their rooms.  
> Ideally, I would like to use a pulldown (and validation) so that there  
> are a few consistent options. One of these options, though, is Japanese  
> ‘tatami’ flooring (ç•³). Is there any reason NOT to store this in the  
> database as ‘ç•³’ instead of ‘tatami?’ Or should I just wait until I  
> integrate the Globalize plugin?

If it will be the only kanji in the database, it seems like a lot of  
trouble to go through (making sure everything is set to unicode, making  
sure that your webserver can handle it [for some reason mongrel chokes  
on kanji for me], and so on.) I guess it all depends on how much that  
little character is worth displaying for you. Personally, I’d just write  
it out in romaji.

---

<div class="post-metadata">

**Author:** ![taylorstrait](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b5a626/32.png) [@taylorstrait](https://www.ruby-forum.com/u/taylorstrait)\
**Post date:** [December 12, 2006, 7:45pm UTC](https://www.ruby-forum.com/t/mixing-english-and-japanese-in-db/79072/3 "2006-12-12T19:45:42Z")

</div>

On 12/11/06, Taylor S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I want user to be able to input various flooring types for their rooms.  
> Ideally, I would like to use a pulldown (and validation) so that there  
> are a few consistent options. One of these options, though, is Japanese  
> ‘tatami’ flooring (e$B\>ve(B). Is there any reason NOT to store this in the  
> database as ‘e$B\>ve(B’ instead of ‘tatami?’ Or should I just wait until I  
> integrate the Globalize plugin?

This is an interesting localisation problem.

Obviously technical stuff: store everything in the database as UTF-8  
and you are covered (well its not that simple but thats the basics).  
That way the user can enter custom information for flooring types  
that are japanese-only, or you can offer it as a choice in a drop down  
or whatever.

Note that Globalise AFAIK assumes that you pick a dominant language  
and stick to it. Translation is in effect unidirectional.  
(Someone correct me on this if I am wrong). For the ‘english reference’  
I would just romanize it: ‘tatami’ or ‘tatami (japanese floormats)’.

I am curious though, is tatami in this sense, just a flooring type?

In the same sense, that a user may have  
wooden, hard-wood, carpeted, tiled, stone, linoleum, or PVC flooring  
etc.  
Or is it a unit of measurement (like a 4-tatami room)?

I know that tatami have a uniform size and are as a consequence  
used as a unit of room _size_ measurement, in the same way that  
we might otherwise use square metres or square feet.

If thats the case, I wouldn’t try unit conversions between tatami  
and sq/m,sq/ft.

---

<div class="post-metadata">

**Author:** ![taylorstrait](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b5a626/32.png) [@taylorstrait](https://www.ruby-forum.com/u/taylorstrait)\
**Post date:** [December 15, 2006, 5:31pm UTC](https://www.ruby-forum.com/t/mixing-english-and-japanese-in-db/79072/4 "2006-12-15T17:31:25Z")

</div>

Richard C. wrote:

> If thats the case, I wouldn’t try unit conversions between tatami  
> and sq/m,sq/ft.

No one answered this, but I think it’s the latter. In Japan, it is  
common to measure the size of a room in terms of tatami units…

Cheers  
Mohit.
