Re: Finding string with special characters

From: Markus Scherer (
Date: Wed Feb 26 2003 - 13:06:14 EST

  • Next message: Yung-Fong Tang: "Re: Unicode 4.0 BETA available for review"

    It sounds like you don't know in what encoding you get your input, and you are munging the input
    bytes(?!) in a custom way.

    You need to identify the input encoding/charset and, in Java, instantiate an InputStreamReader with
    the correct encoding name. Then you get proper Unicode strings, and there will be nothing "special"
    about Polish characters.

    Please read the documentation on about how to process text in Java. There is a tutorial
    about Internationalization that covers text encodings.


    SRIDHARAN Aravind wrote:
    > Hi Mark!


    > The thing is that I get data from mainframe. And my client is from Poland.
    > And in our application, we have 2-language support (english and polish).
    > And I am responsible for generating PDF reports in Java.
    > For Polish language, I employ a function which converts special character strings that I get them displayed properly on PDF's.
    > For English language, I do not employ any such function.
    > A few days ago, my client entered data with special characters( some polish characters) in the english language application. Since I don't employ the convert function for english language, in the PDF, the special characters( my client keyed-in or from mainframe) came as junk.
    > And the client said he would not accept this.
    > Irrespective of the language, I could employ the convert function I wrote.
    > But I have a second thought. Why not I have something that detect a string with special characters? If not possible, on a final basis, I thought of applying the convert function I wrote for both languages.
    > This was the reason that made me post a question yesterday in the unicode group.
    > Aravind

    Opinions expressed here may not reflect my company's positions unless otherwise noted.

    This archive was generated by hypermail 2.1.5 : Wed Feb 26 2003 - 14:11:56 EST