title: Gujarati text in Java String
body: <p>I have Gujarati Bible and trying to insert each verse in MySQL database using parser written in Java. When I assign Gujarati text to Java String variable it shows junks in debug. </p>
  
  <p>E.g. This is my Gujarati text </p>
  
  <blockquote>
    <p>હે યહોવા તું મારો દેવ છે;</p>
  </blockquote>
  
  <p>I assign it to Java String variable as shown below</p>
  
  <p><code>verse._verseText = "હે યહોવા તું મારો દેવ છે;";</code></p>
  
  <p>What i see in debug window is all junk characters. Any help is appreciated. If need more information let me know and I will provide as and when asked.</p>
  
  <p><strong>UPDATE</strong>
  Pasting my parser code here</p>
  
  <pre><code>private Boolean Insert(String _text)
  {
      BibleVerse verse = new BibleVerse();
      String[] data = _text.split("\\|");
      try
      {
          if (data[0].equals(bookName) || bookName.equals("All"))
          {
              verse._Version = "Gujarati";
              verse._book = data[0];
              verse._chapter = Integer.parseInt(data[1]); 
              verse._verse = Integer.parseInt(data[2]);
              verse._verseText = new String(data[3].getBytes(), "UTF-8");
              _bibleDatabase.Insert(verse);
              pcs.firePropertyChange("logupdate", null, data[0] + " " + data[1] + "," + data[2] + " - INSERTED.");
          }
          else
          {
              pcs.firePropertyChange("logupdate", null, data[0] + " " + data[1] + "," + data[2] + " - SKIPPED.");
          }
          return true;
      }
      catch(Exception e)
      {
          pcs.firePropertyChange("logupdate", null, "ERROR : " + e.getMessage());
          return false;
      }       
  }
  </code></pre>
  
  <p>Here is the sample line from the text file</p>
  
  <p><code>Isaiah|25|1|હે યહોવા તું મારો દેવ છે; હું તને મોટો માનીશ, હું તારા નામની સ્તુતિ કરીશ; કેમકે તેં અદભુત કાર્યો કર્યાં છે, તેં વિશ્વાસુપણે તથા સત્યતાથી પુરાતન સંકલ્પો પાર પાડ્યા છે.</code></p>
  
  <p><strong>UPDATE</strong>
  Here is the code where I open &amp; read file.</p>
  
  <pre><code>try 
      {
          FileReader _file = new FileReader(this._filename);  
          _bufferedReader = new BufferedReader(_file);
  
          SwingWorker parseWorker = new SwingWorker()
          {
              @Override
              protected Object doInBackground() throws Exception 
              {
                  String line;
                  String[] data;
                  int lineno=0;
                  BibleVerse verse = new BibleVerse();
  
                  while ((line = _bufferedReader.readLine()) != null) 
                  {
                      ++lineno;
                      pcs.firePropertyChange("pgbupdate", null, lineno);
                      Insert(line);
                  }
                  _bufferedReader.close();
                  return null;
              }
  
              @Override
              protected void done()
              {
                  pcs.firePropertyChange("logupdate", null, "Parsing complete.");
              }
          };
          parseWorker.execute();
      } 
      catch (Exception e) 
      {
          pcs.firePropertyChange("logupdate", null, "ERROR : " + e.getMessage());
      }
  </code></pre>