How to read russian characters properly

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sushmita
    New Member
    • Mar 2007
    • 18

    How to read russian characters properly

    Hi All

    I am trying to read russian characters from xml,while doing so,i have taken care of UTF-8,but still few letters come in form of question marks and square blocks.

    Please can anyone help me out with this....

    Thanks..
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by Sushmita
    Hi All

    I am trying to read russian characters from xml,while doing so,i have taken care of UTF-8,but still few letters come in form of question marks and square blocks.

    Please can anyone help me out with this....

    Thanks..
    Probably it's a font issue; try to change the font to "Arial MS Unicode" and see
    if it helps (assuming you have that font available).

    kind regards,

    Jos

    Comment

    • Sushmita
      New Member
      • Mar 2007
      • 18

      #3
      Originally posted by JosAH
      Probably it's a font issue; try to change the font to "Arial MS Unicode" and see
      if it helps (assuming you have that font available).

      kind regards,

      Jos
      hi..
      sorry it didnt work..
      few letters are proper while rest are junk.

      Comment

      • JosAH
        Recognized Expert MVP
        • Mar 2007
        • 11453

        #4
        Originally posted by Sushmita
        hi..
        sorry it didnt work..
        few letters are proper while rest are junk.
        For the characters that come out as 'junk' print the character's codepoint, i.e.
        convert the char to an int and print that; do the codepoint makes sense? If not,
        you still have your conversion problem, if they do, it's a font issue.

        kind regards,

        Jos

        Comment

        • Sushmita
          New Member
          • Mar 2007
          • 18

          #5
          Originally posted by JosAH
          For the characters that come out as 'junk' print the character's codepoint, i.e.
          convert the char to an int and print that; do the codepoint makes sense? If not,
          you still have your conversion problem, if they do, it's a font issue.

          kind regards,

          Jos
          what is the solution for "FONT " issue????

          Comment

          • JosAH
            Recognized Expert MVP
            • Mar 2007
            • 11453

            #6
            Originally posted by Sushmita
            what is the solution for "FONT " issue????
            Did you read my previous reply? Either it's a font issue or it isn't. The Arial MS Unicode
            font can display Russian (Cyrillic) characters. You wrote that they still show as junk
            characters so (probably) it isn't a font problem; it couls be a conversion problem. That's
            why I suggested to print out the code point values of the characters and check whether
            or not they show up correctly. Also see the charts from the Unicode Table for the
            correct code point values. It's your software so you have to fix it.

            kind regards,

            Jos

            Comment

            • Sushmita
              New Member
              • Mar 2007
              • 18

              #7
              Originally posted by JosAH
              Did you read my previous reply? Either it's a font issue or it isn't. The Arial MS Unicode
              font can display Russian (Cyrillic) characters. You wrote that they still show as junk
              characters so (probably) it isn't a font problem; it couls be a conversion problem. That's
              why I suggested to print out the code point values of the characters and check whether
              or not they show up correctly. Also see the charts from the Unicode Table for the
              correct code point values. It's your software so you have to fix it.

              kind regards,

              Jos
              i have checked ur reply.....and i hav chkd the codept..it's fine..

              see this is the following code for conversion is any change required??
              dicValue="russi an/chinese characters"
              new String(dicValue .getBytes(),"UT F-8");

              Comment

              • JosAH
                Recognized Expert MVP
                • Mar 2007
                • 11453

                #8
                Originally posted by Sushmita
                i have checked ur reply.....and i hav chkd the codept..it's fine..

                see this is the following code for conversion is any change required??
                dicValue="russi an/chinese characters"
                new String(dicValue .getBytes(),"UT F-8");
                Have you checked if your system's default *encoding* is UTF-8? Check out
                the overloaded 'getBytes()' methods in the String class.

                kind regards,

                Jos

                Comment

                Working...