Unicode in property file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • aradhanathawait
    New Member
    • Mar 2008
    • 36

    Unicode in property file

    Hi all

    If the unicode (Hindi) labels are placed in the JSP pages itself literaly then they are displayed correctly. But in some forms where Labels are coming from property files, ???? is being displayed in the browser. while in the IDE it is showing Hindi characters. Please help me. I am novice for Java.

    Thanx in advance.
    Aradhana
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Did you use the syntax \uXXXX where XXXX are the four hexadecimal nibbles of
    the Unicode codepoint?

    kind regards,

    Jos

    Comment

    • aradhanathawait
      New Member
      • Mar 2008
      • 36

      #3
      Yes I tried it and was displaying properly but it's a tedious job to use the corresponing hexadecimal code corresponding to every letter. Please tell about some editor that converts the letter into its hexadecimal code.

      Thanx and Regards,
      Aradhana

      Comment

      • JosAH
        Recognized Expert MVP
        • Mar 2007
        • 11453

        #4
        Originally posted by aradhanathawait
        Yes I tried it and was displaying properly but it's a tedious job to use the corresponing hexadecimal code corresponding to every letter. Please tell about some editor that converts the letter into its hexadecimal code.

        Thanx and Regards,
        Aradhana
        So basically your problem is solved; I don't know of any editor that can do this
        but it's quite easy to write a little program that converts any character code xxxx
        for xxxx not in the range [32, 127] to convert it to \uxxxx

        kind regards,

        Jos

        Comment

        • BigDaddyLH
          Recognized Expert Top Contributor
          • Dec 2007
          • 1216

          #5
          Originally posted by JosAH
          So basically your problem is solved; I don't know of any editor that can do this
          but it's quite easy to write a little program that converts any character code xxxx
          for xxxx not in the range [32, 127] to convert it to \uxxxx

          kind regards,

          Jos
          The JDK comes with a tool to do exactly this: native2ascii.ex e

          Comment

          • JosAH
            Recognized Expert MVP
            • Mar 2007
            • 11453

            #6
            Originally posted by BigDaddyLH
            The JDK comes with a tool to do exactly this: native2ascii.ex e

            http://java.sun.com/developer/JDCTec.../tt0506.html#1
            Well look at that: I even never *noticed* that little tool; cute; thanks for mentioning it.

            kind regards,

            Jos (<--- learned something new again)

            Comment

            • aradhanathawait
              New Member
              • Mar 2008
              • 36

              #7
              Originally posted by JosAH
              Well look at that: I even never *noticed* that little tool; cute; thanks for mentioning it.

              kind regards,

              Jos (<--- learned something new again)
              Actually I am using struts on RHEL4.0 and I have to display the lables in Hindi. I have created a property file containing Hindi Lables, added it in struts_config.x ml. But when I went to set the default language for webpages in Mozilla firefox as Hindi. It is not showing Hindi in the list of Languages while Marathi and Sanskrit are being shown. What to do to bring Hindi in the list of Languages. Please help .
              Thanx n regards,
              Aradhana

              Comment

              • JosAH
                Recognized Expert MVP
                • Mar 2007
                • 11453

                #8
                Originally posted by aradhanathawait
                Actually I am using struts on RHEL4.0 and I have to display the lables in Hindi. I have created a property file containing Hindi Lables, added it in struts_config.x ml. But when I went to set the default language for webpages in Mozilla firefox as Hindi. It is not showing Hindi in the list of Languages while Marathi and Sanskrit are being shown. What to do to bring Hindi in the list of Languages. Please help .
                Thanx n regards,
                Aradhana
                I know nothing about the Hindi language but this this help?
                http://developers.sun.com/dev/gadc/t...thai_hindi.pdf.

                kind regards,

                Jos

                Comment

                Working...