Write/Read File having Japanese characters as file name

Discussion in 'Ruby' started by Sudheendra Panganamala, Jul 8, 2010.

  1. Hi

    My requirement is to create new files by names from database(UTF8
    encoded for multi language support).

    Mostly Japanese langauge support. I need to create file for each project
    with project name. Sometimes the project name will be in Japanese.

    In such case i could not generate file name with "事由別ãƒã‚°ãƒ¬ãƒãƒ¼ãƒˆ.txt".

    I am getting always garbage characters as file name ex:
    事çâ€Â±Ã¥Ë†Â¥Ã£Æ’ÂグレãƒÂートtest.txt

    Awaiting for your help. Thanks in advance.

    Regards,
    Sudheendra
    --
    Posted via http://www.ruby-forum.com/.
     
    Sudheendra Panganamala, Jul 8, 2010
    #1
    1. Advertising

  2. Sudheendra Panganamala

    Luis Lavena Guest

    On Jul 8, 8:25 am, Sudheendra Panganamala <> wrote:
    > Hi
    >
    > My requirement is to create new files by names from database(UTF8
    > encoded for multi language support).
    >
    > Mostly Japanese langauge support. I need to create file for each project
    > with project name. Sometimes the project name will be in Japanese.
    >
    > In such case i could not generate file name with "事由別ãƒã‚°ãƒ¬ãƒãƒ¼ãƒˆ.txt".
    >
    > I am getting always garbage characters as file name ex:
    > 事çâ€Â±Ã¥Ë†Â¥Ã£Æ’ グレムートtest.txt
    >
    > Awaiting for your help. Thanks in advance.
    >


    How are you retrieving the values from the database? Are sure is
    UTF-8?

    If you're under Windows, the only version capable of doing it is
    1.9.2, which -rc1 has been _broken_ in relation to gems so is advised
    to avoid it.

    You can try with 1.9.2-preview3

    --
    Luis Lavena
     
    Luis Lavena, Jul 8, 2010
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joseph
    Replies:
    2
    Views:
    5,623
  2. =?Utf-8?B?TXVoYW1tYWQgQWhtYWQ=?=

    Japanese Characters Show up as ??? when email is sent from aspx page

    =?Utf-8?B?TXVoYW1tYWQgQWhtYWQ=?=, Apr 28, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    951
  3. =?Utf-8?B?U2hyZWs=?=

    Zip a file with Chinese or Japanese file name

    =?Utf-8?B?U2hyZWs=?=, Jun 9, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    649
    =?Utf-8?B?U2hyZWs=?=
    Jun 9, 2005
  4. dinesh
    Replies:
    0
    Views:
    589
    dinesh
    Dec 7, 2004
  5. Steve
    Replies:
    16
    Views:
    1,293
    David Dorward
    Dec 10, 2003
Loading...

Share This Page