property file for Chinese characters - Weblogic

This is a discussion on property file for Chinese characters - Weblogic ; Hi, I'm trying to figure out a way to put Chinese char info to a property file. How can I figure out the map between ascii characters and a Chinese character? Any replies are appreciated! --Renqi Li...

+ Reply to Thread
Results 1 to 7 of 7

property file for Chinese characters

  1. Default property file for Chinese characters

    Hi,

    I'm trying to figure out a way to put Chinese char info
    to a property file.
    How can I figure out the map between ascii characters
    and a Chinese character?

    Any replies are appreciated!
    --Renqi Li



  2. Default Re: property file for Chinese characters

    ASCII is just a subset of the chinese char set, and all/most others I
    believe. I think what you want to do is translate the words and
    sentences, not the characters. Regardless, WLS 6.0 will provide support
    for i18n of text, via property resource bundles and tools to create
    message catalogs and translate them into your favorite locale.

    Renqi Li wrote:

    > Hi,
    >
    > I'm trying to figure out a way to put Chinese char info
    > to a property file.
    > How can I figure out the map between ascii characters
    > and a Chinese character?
    >
    > Any replies are appreciated!
    > --Renqi Li




  3. Default Re: property file for Chinese characters

    Hi Steve,

    Thanks for your reply!

    Probably I didn't explain my problem clear enough.
    For example, in .._en_US.properties file, I have "savebutton=3DSave" for
    English
    in .._fr_FR.properties file, I have
    "savebutton=3DSauver" for French
    now, in my chinese property file, .._zh_CN.properties,
    how can I figure out the right hand side of "=3D"?

    For each Chinese character, there is a encoded code to match which can
    be put in ASCII characters, such as \u#### format.

    I can save my Chinese words in notepad as unicode.
    But I'm trying to find the \u#### ascii way to represent them in my
    properties file. I tried "native2ascii" tool, but doesn't seem to work.

    Am I making it a little bit more clear?
    Thanks a lot for your help!
    --Renqi Li



    Steve Fanshier wrote:

    > ASCII is just a subset of the chinese char set, and all/most others I
    > believe. I think what you want to do is translate the words and
    > sentences, not the characters. Regardless, WLS 6.0 will provide support
    > for i18n of text, via property resource bundles and tools to create
    > message catalogs and translate them into your favorite locale.
    >
    > Renqi Li wrote:
    >
    > > Hi,
    > >
    > > I'm trying to figure out a way to put Chinese char info
    > > to a property file.
    > > How can I figure out the map between ascii characters
    > > and a Chinese character?
    > >
    > > Any replies are appreciated!
    > > --Renqi Li




  4. Default Re: property file for Chinese characters

    native2ascii should do the job for you.

    native2ascii accepts '-encoding' option to specify input encoding.

    e.g.
    native2ascii -encoding Unicode <input file name>


    Renqi Li wrote:

    > Hi Steve,
    >
    > Thanks for your reply!
    >
    > Probably I didn't explain my problem clear enough.
    > For example, in .._en_US.properties file, I have "savebutton=3DSave" for
    > English
    > in .._fr_FR.properties file, I have
    > "savebutton=3DSauver" for French
    > now, in my chinese property file, .._zh_CN.properties,
    > how can I figure out the right hand side of "=3D"?
    >
    > For each Chinese character, there is a encoded code to match which can
    > be put in ASCII characters, such as \u#### format.
    >
    > I can save my Chinese words in notepad as unicode.
    > But I'm trying to find the \u#### ascii way to represent them in my
    > properties file. I tried "native2ascii" tool, but doesn't seem to work.
    >
    > Am I making it a little bit more clear?
    > Thanks a lot for your help!
    > --Renqi Li
    >
    > Steve Fanshier wrote:
    >
    > > ASCII is just a subset of the chinese char set, and all/most others I
    > > believe. I think what you want to do is translate the words and
    > > sentences, not the characters. Regardless, WLS 6.0 will provide support
    > > for i18n of text, via property resource bundles and tools to create
    > > message catalogs and translate them into your favorite locale.
    > >
    > > Renqi Li wrote:
    > >
    > > > Hi,
    > > >
    > > > I'm trying to figure out a way to put Chinese char info
    > > > to a property file.
    > > > How can I figure out the map between ascii characters
    > > > and a Chinese character?
    > > >
    > > > Any replies are appreciated!
    > > > --Renqi Li




  5. Default Re: property file for Chinese characters

    I've actually just undergone a similar effort. We're serving our pages as
    UTF-8 and also encode our i18n_locale.properties files as such. I found th=
    at
    Microsoft Word does a pretty good job of allowing us to open, modify and sa=
    ve
    encoded text files. The only trick is to use Arial Unicode MS as your font=
    for
    displaying these files as you edit them (you can specify this as the defaul=
    t
    font for UTF-8 encoding.)

    This also allows us to manipulate our properties files just as they will be
    viewed through a client browser without performing character conversion to
    /U####.

    Hope this helps.

    - Jackson


    Steve Fanshier wrote:

    > native2ascii should do the job for you.
    >
    > native2ascii accepts '-encoding' option to specify input encoding.
    >
    > e.g.
    > native2ascii -encoding Unicode <input file name>
    >
    > Renqi Li wrote:
    >
    > > Hi Steve,
    > >
    > > Thanks for your reply!
    > >
    > > Probably I didn't explain my problem clear enough.
    > > For example, in .._en_US.properties file, I have "savebutton=3DSave" fo=

    r
    > > English
    > > in .._fr_FR.properties file, I have
    > > "savebutton=3DSauver" for French
    > > now, in my chinese property file, .._zh_CN.properties,
    > > how can I figure out the right hand side of "=3D"?
    > >
    > > For each Chinese character, there is a encoded code to match which can
    > > be put in ASCII characters, such as \u#### format.
    > >
    > > I can save my Chinese words in notepad as unicode.
    > > But I'm trying to find the \u#### ascii way to represent them in my
    > > properties file. I tried "native2ascii" tool, but doesn't seem to work.
    > >
    > > Am I making it a little bit more clear?
    > > Thanks a lot for your help!
    > > --Renqi Li
    > >
    > > Steve Fanshier wrote:
    > >
    > > > ASCII is just a subset of the chinese char set, and all/most others I
    > > > believe. I think what you want to do is translate the words and
    > > > sentences, not the characters. Regardless, WLS 6.0 will provide suppo=

    rt
    > > > for i18n of text, via property resource bundles and tools to create
    > > > message catalogs and translate them into your favorite locale.
    > > >
    > > > Renqi Li wrote:
    > > >
    > > > > Hi,
    > > > >
    > > > > I'm trying to figure out a way to put Chinese char info
    > > > > to a property file.
    > > > > How can I figure out the map between ascii characters
    > > > > and a Chinese character?
    > > > >
    > > > > Any replies are appreciated!
    > > > > --Renqi Li




  6. Default Re: property file for Chinese characters

    Hi, I had the same problem, and the native2ascii tool didn't seem to work,
    What I did was I extended the ResourceBundle class to accept and InputStrea=
    m
    and an Encoding type as parameters, and use InputStreamReader to read from
    the properties file. That way I can read Big5 charset and GBK for
    traditional and simplified chinese. This also allowed me to edit and save
    my chinese property file in our chinese editor.
    The only problem is that I had to harcode the property file name when
    creating the resource bundle.
    This seems to work well.

    Chriss
    "Earl Bob" <EarlBob@earthlink.net> wrote in message
    news:39F70BDA.992AEB77@earthlink.net...
    > I've actually just undergone a similar effort. We're serving our pages a=

    s
    > UTF-8 and also encode our i18n_locale.properties files as such. I found

    that
    > Microsoft Word does a pretty good job of allowing us to open, modify and

    save
    > encoded text files. The only trick is to use Arial Unicode MS as your

    font for
    > displaying these files as you edit them (you can specify this as the

    default
    > font for UTF-8 encoding.)
    >
    > This also allows us to manipulate our properties files just as they will

    be
    > viewed through a client browser without performing character conversion t=

    o
    > /U####.
    >
    > Hope this helps.
    >
    > - Jackson
    >
    >
    > Steve Fanshier wrote:
    >
    > > native2ascii should do the job for you.
    > >
    > > native2ascii accepts '-encoding' option to specify input encoding.
    > >
    > > e.g.
    > > native2ascii -encoding Unicode <input file name>
    > >
    > > Renqi Li wrote:
    > >
    > > > Hi Steve,
    > > >
    > > > Thanks for your reply!
    > > >
    > > > Probably I didn't explain my problem clear enough.
    > > > For example, in .._en_US.properties file, I have "savebutton=3DSave" =

    for
    > > > English
    > > > in .._fr_FR.properties file, I have
    > > > "savebutton=3DSauver" for French
    > > > now, in my chinese property file, .._zh_CN.properties,
    > > > how can I figure out the right hand side of "=3D"?
    > > >
    > > > For each Chinese character, there is a encoded code to match which

    can
    > > > be put in ASCII characters, such as \u#### format.
    > > >
    > > > I can save my Chinese words in notepad as unicode.
    > > > But I'm trying to find the \u#### ascii way to represent them in my
    > > > properties file. I tried "native2ascii" tool, but doesn't seem to

    work.
    > > >
    > > > Am I making it a little bit more clear?
    > > > Thanks a lot for your help!
    > > > --Renqi Li
    > > >
    > > > Steve Fanshier wrote:
    > > >
    > > > > ASCII is just a subset of the chinese char set, and all/most others

    I
    > > > > believe. I think what you want to do is translate the words and
    > > > > sentences, not the characters. Regardless, WLS 6.0 will provide

    support
    > > > > for i18n of text, via property resource bundles and tools to create
    > > > > message catalogs and translate them into your favorite locale.
    > > > >
    > > > > Renqi Li wrote:
    > > > >
    > > > > > Hi,
    > > > > >
    > > > > > I'm trying to figure out a way to put Chinese char info
    > > > > > to a property file.
    > > > > > How can I figure out the map between ascii characters
    > > > > > and a Chinese character?
    > > > > >
    > > > > > Any replies are appreciated!
    > > > > > --Renqi Li

    >





  7. Default Re: property file for Chinese characters


    Hi,

    I had the same problem. I did the same as you did (multiple resource-bundle=
    files for big5,gb,en) but the problem is, how did you know the encoding ty=
    pe of the client session?

    What I did is putting a value in the session and get client's language. The=
    n, for all input text, I have to convert the string with request.getParamet=
    er("text1").getBytes("Big5") to get the exact string with the correct chars=
    et-encoding format. Then oracle can store it correctly. (Otherwise, oracle =
    will store the ascii code.)

    One new features in the weblogic sp8 is the default inputCharset. (you can =
    check the release note). I tried it and it works! I don't need to change al=
    l my jsp/java code to add the getBytes() line to all my request.getParamete=
    r function calling.

    However, I need to convert it back to "Big5" before sending to the http cli=
    ent. Otherwise, it will return two ascii-code things.

    Did any Weblogic pro tried the sp8 and get any solution to this? please adv=
    ise. I don't mind if you can send me direct email at: frank@wailun.com. Tha=
    nks!

    Cheers,
    Frank

    "Christian Corcino" <ccorcino@textrade.com> wrote:
    >Hi, I had the same problem, and the native2ascii tool didn't seem to work,
    >What I did was I extended the ResourceBundle class to accept and InputStre=

    am
    >and an Encoding type as parameters, and use InputStreamReader to read from
    >the properties file. That way I can read Big5 charset and GBK for
    >traditional and simplified chinese. This also allowed me to edit and save
    >my chinese property file in our chinese editor.
    >The only problem is that I had to harcode the property file name when
    >creating the resource bundle.
    >This seems to work well.
    >
    >Chriss
    >"Earl Bob" <EarlBob@earthlink.net> wrote in message
    >news:39F70BDA.992AEB77@earthlink.net...
    >> I've actually just undergone a similar effort. We're serving our pages =

    as
    >> UTF-8 and also encode our i18n_locale.properties files as such. I found

    >that
    >> Microsoft Word does a pretty good job of allowing us to open, modify and

    >save
    >> encoded text files. The only trick is to use Arial Unicode MS as your

    >font for
    >> displaying these files as you edit them (you can specify this as the

    >default
    >> font for UTF-8 encoding.)
    >>
    >> This also allows us to manipulate our properties files just as they will

    >be
    >> viewed through a client browser without performing character conversion =

    to
    >> /U####.
    >>
    >> Hope this helps.
    >>
    >> - Jackson
    >>
    >>
    >> Steve Fanshier wrote:
    >>
    >> > native2ascii should do the job for you.
    >> >
    >> > native2ascii accepts '-encoding' option to specify input encoding.
    >> >
    >> > e.g.
    >> > native2ascii -encoding Unicode <input file name>
    >> >
    >> > Renqi Li wrote:
    >> >
    >> > > Hi Steve,
    >> > >
    >> > > Thanks for your reply!
    >> > >
    >> > > Probably I didn't explain my problem clear enough.
    >> > > For example, in .._en_US.properties file, I have "savebutton=3DSave"=

    for
    >> > > English
    >> > > in .._fr_FR.properties file, I have
    >> > > "savebutton=3DSauver" for French
    >> > > now, in my chinese property file, .._zh_CN.properties,
    >> > > how can I figure out the right hand side of "=3D"?
    >> > >
    >> > > For each Chinese character, there is a encoded code to match which

    >can
    >> > > be put in ASCII characters, such as \u#### format.
    >> > >
    >> > > I can save my Chinese words in notepad as unicode.
    >> > > But I'm trying to find the \u#### ascii way to represent them in my
    >> > > properties file. I tried "native2ascii" tool, but doesn't seem to

    >work.
    >> > >
    >> > > Am I making it a little bit more clear?
    >> > > Thanks a lot for your help!
    >> > > --Renqi Li
    >> > >
    >> > > Steve Fanshier wrote:
    >> > >
    >> > > > ASCII is just a subset of the chinese char set, and all/most other=

    s
    >I
    >> > > > believe. I think what you want to do is translate the words and
    >> > > > sentences, not the characters. Regardless, WLS 6.0 will provide

    >support
    >> > > > for i18n of text, via property resource bundles and tools to creat=

    e
    >> > > > message catalogs and translate them into your favorite locale.
    >> > > >
    >> > > > Renqi Li wrote:
    >> > > >
    >> > > > > Hi,
    >> > > > >
    >> > > > > I'm trying to figure out a way to put Chinese char info
    >> > > > > to a property file.
    >> > > > > How can I figure out the map between ascii characters
    >> > > > > and a Chinese character?
    >> > > > >
    >> > > > > Any replies are appreciated!
    >> > > > > --Renqi Li

    >>

    >
    >




+ Reply to Thread