A ques about Reading and Writing non-Latin character Strings

Never had any need to to the captioned before, so I never investigated it. But now I do.
We are in the midst of a major conversion of our software to UTF-8. Oracle Forms displays these Strings (ex: Українська) properly, but when I query the DB column behind the form and display the O/P to a TextArea, or use BufferedWriter to write it to a File it displays the old upside-down question mark. Similarly if I load data into the column, while it displays fine in my SQL statement, it loads wrong and displays on the form as UD?marks. So, what simple thing am I missing?
~Bill
Edited by: abillconsl on Dec 5, 2008 8:31 PM

I downloaded the ojdbc14.jar and the pgm can find it and I can connect to the DB via:URL url = "jdbc:oracle:thin:"+host; // host is the hostname, port and sid
Connection con = DriverManager.getConnection( url, uid, pwd );
{code}
But I want to connect via:
{code:java}"jdbc:odbc:"+sid; // where sid is the USER DSN in the ODBC Data Source Administrator
{code} ... but I need to run the setup pgm for the driver and I can't find one for Oracle. Anybody know where I should be looking? In the past the DB Admins set these up.
~Bill                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Reading and writing non-English files

    Hi there..
         I wonder if anyone can tell me how to read and write non-English language files like French or Arabic files...
    Im also interested in knowing how can i convert from Unicode to ASCII and vice versa..
         thanx.. Mourad

    hi there ..
    thanx for ur cooperation .. but actually i have tried the following code and it didnt work; so, im looking for more help :)
    esp. if there are any notes about the files themselves for example;
    by the way i used Notepad files in unicode format..
    my code is :
    import java.io.*;
    public class MainClass {
    public static void main(String args[]){
    String inputfile = "arabic.txt";
    String outfile = "outfile.txt";
    try{
    RandomAccessFile raf = new RandomAccessFile(inputfile, "r");
    InputStreamReader isr = new InputStreamReader(
    new FileInputStream(inputfile), "Cp1256");
    OutputStreamWriter osw = new OutputStreamWriter(
    new FileOutputStream(outfile), "Cp1256");
    for(int i=0; i<raf.length(); i++)
    osw.write(isr.read());
    osw.close();
    }catch(UnsupportedEncodingException uee){
    System.out.println("UEException: "+ uee.getMessage());
    }catch(FileNotFoundException fnfe){
    System.out.println("FNFException: "+ fnfe.getMessage());
    }catch(IOException ioe){
    System.out.println("IOException: "+ ioe.getMessage());
    thanx again..Mourad

  • Writing non-latin Character to Log file from Java application

    Hi Everyone,
    I'm encountering a very strange localization issue.
    I'm executing the following code from a J2EE application (although the behavior is replicated exactly from a Java console application):
    File testFile = new File("D:\\Temp\\blah.txt");
    testFile.createNewFile();
    Writer output = null;
    try {
    output = new BufferedWriter( new FileWriter(testFile) );
    output.write( "אחד שתיים שלוש" ); // Non-Latin characters
    output.write("one two three");
    finally {
    if (output != null) output.close();
    I'm writing non-latin characters (Hebrew in my case) to the file, but these characters are written as question marks:
    ??? ????? ????one two three
    I'm running the project with the following java arguments:
    -Dfile.encoding=UTF8 -Duser.region=IL -Duser.language=he
    And the Project Properties -> Compiler -> Character Encoding = UTF8
    Also, the local Windows Regional Settings are set to Israel / Hebrew.
    Can someone please help with this issue?
    I've tried this with UTF-8 (instead of UTF8) and still no results.
    I suspect this is a Java / Environment issue as it reproduces on a J2EE app and on a console app.
    Any help will be greatly appreciated.
    Thanks,
    Tal.

    You should open/close it somehow at every write from different processes.
    But I personally prefer different file names to your forced merging, though.

  • I updated Itunes today to the latest version. Windows 7 64bit. None of my drivers work and get an error when itunes starts, about registry setting for reading and writing dvds and cds missing. Anyone else have the same issue. I downloaded itunes again, re

    I updated Itunes today to the latest version. Windows 7 64bit. None of my drivers work and get an error when itunes starts, about registry setting for reading and writing dvds and cds missing. Anyone else have the same issue. I downloaded itunes again, reinstalled still have same issue.

    I'd start with the following document, with one modification. At step 12 after typing GEARAspiWDM press the Enter/Return key once prior to clicking OK. (Pressing Return adds a carriage return in the field and is important.)
    iTunes for Windows: "Registry settings" warning when opening iTunes

  • Reading and Writing large Excel file using JExcel API

    hi,
    I am using JExcelAPI for reading and writing excel file. My problem is when I read file with 10000 records and 95 columns (file size about 14MB), I got out of memory error and application is crashed. Can anyone tell me is there any way that I can read large file using JExcelAPI throug streams or in any other way. Jakarta POI is also showing this behaviour.
    Thanks and advance

    Sorry when out of memory error is occurred no stack trace is printed as application is crashed. But I will quote some lines taken from JProfiler where this problem is occurred:
              reader = new FileInputStream(new File(filePath));
              workbook = Workbook.getWorkbook(reader);
              *sheeet = workbook.getSheet(0);* // here out of memory error is occured
               JProfiler tree:
    jxl.Workbook.getWorkBook
          jxl.read.biff.File 
                 jxl.read.biff.CompoundFile.getStream
                       jxl.read.biff.CompoundFile.getBigBlockStream Thanks

  • Reading and writing a ByteArray

    This question was posted in response to the following article: http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118666ade46-7d54.html

    I believe that the example of Reading and Writing Objects needs a rewrite
    First, the attempt to use comments to interleave a Flex-ified example with a Flash example of the uses of the ByteArray Class is a shortcut that ultimately fails.  Take the time to create two, separately valid examples for the two different frameworks.
    Second, the interlinea comments show a rather poor example of how to write clean code, and are entirely confusing to the person you you trying to help learn how to use your library.  Look at the declaration of a variable called outFile:File, a comment about some function that is to be declared somewhere with the same name, outFile(), and indeed, if this code were to compile -- which I am sure it could not -- the compiler would see that you try to invoke an outFile() function.  No one gets through an interview who writes code that way.
    Third, I am not sure you understand how the readBytes and writeBytes methods work. In the upper example, where an order is being written to the file system, the writeBytes method uses data.length correctly.  At the point in time that it is used, the XML object will have been written into the bytes:ByteArray, so it will have a proper length.
    On the other hand, in the second half of the example, where the readBytes method similarly passes data.length, the reader has to be very lucky to note that at that point in time data.length will have a value of zero.  The inBytes:ByteArray was only instantiated, not populated with anything, as, indeed it should not be, at that point in the logic flow.  Most importantly, when the program does need to readBytes, there is no way for the program to know in advance what the length of the byte stream coming in from the file system will be.  Your example would be more correct, and could make a useful point in showing that readBytes (data) is the correct way to pass the arguments because the default behavior will then be used and the default behavior will be to make data whatever length it needs to be in order to hold the content from the file system.  The program can know the value of data.length after the read has taken place, but not before.

  • Problem on reading and writing from from a *.txt file

    I get Problem on reading and writing from from a *.txt file. The following is the read() method...
    The software said the DataInputStream is depreciated. Can anyone help me please?
    public void read()
        File file = new File("C://Documents and Settings//Charles//My Documents//Brunel//EE2065//Assignment and Lab//Assignment 4 and Lab 4//data.txt");
        FileInputStream in = null;
        String str = "";
        try
          in = new BufferedReader(file);
          //in = new FileInputStream(file);
          for(;;)
            str = new BufferedReader(in).readLine();
            //str = new DataInputStream(in).readLine();
            if(str == null)
              break;
            System.out.print(str);
        in.close();
        catch(IOException e)
            System.err.println("execution error: " +e);
      }

    Thank you for your reply. I have made some change. However, there is an incompetable type found error.
    in = new BufferedReader(new InputStreamReader(in));The following are all of the code.
    public void read()
        File file = new File("C://Documents and Settings//Charles//My Documents//Brunel//EE2065//Assignment and Lab//Assignment 4 and Lab 4//data.txt");
        FileInputStream in = null;
        //BufferedReader in = null;
        String str = "";
        try
          in = new BufferedReader(new InputStreamReader(in));
          //in = new FileInputStream(file);
          for(;;)
            BufferedReader Bstr = new BufferedReader(new InputStreamReader(in));
            //str = new BufferedReader(in).readLine();
            //str = new DataInputStream(in).readLine();
            if(str == null)
              break;
            System.out.print(str);
        in.close();
        catch(IOException e)
            System.err.println("execution error: " +e);

  • File importer detected an inconsistency in the file stucture of (file name). Reading and writing this file's metadata (XMP) has been disabled.

    I have duplicated a project to work on another computer. The project opens fine but when I import new footage/audio files I get this message. "File importer detected an inconsistency in the file stucture of (file name). Reading and writing this file's metadata (XMP) has been disabled." Then I can't play my timeline and Premier Pro crashes.  I have to force quit and restart my computer to continue working. What does this error really mean? How do you rectify?
    Our workflow requires that we duplicate projects to make updates because we are frequently revising but need to keep original project unchanged and intact.

    I have a similar issue and message , but occurs when I import AVI clips from OnLocation CS4 to Premier Pro CS4.

  • IPhone4 how through the USB mobile phone file reading and writing?

    iPhone4 how through the USB mobile phone file reading and writing?

    No idea what you are asking.
    Please explain

  • Switcher - Reading and Writing External IEEE HDD's

    Greetings,
    i'm trying to read and write with my external ieee drive on windows and the mac pro. it's format is ntfs, and is read only on the mac pro.
    i am admin and can't seem to change the permissions to read / write.
    the over all idea is i need to go back and forth between operating systems reading and writing from both sides of the house.
    here's a snapshot.
    http://briankross.com/images/500GBIEEEHDD.jpg
    Mac Pro   Mac OS X (10.4.8)  

    Unfortunately, no. In order to convert the drive to FAT32 it must be re-partitioned which is a destructive process.
    Why reward points?(Quoted from Discussions Terms of Use.)
    The reward system helps to increase community participation. When a community member gives you (or another member) a reward for providing helpful advice or a solution to their question, your accumulated points will increase your status level within the community.
    Members may reward you with 5 points if they deem that your reply is helpful and 10 points if you post a solution to their issue. Likewise, when you mark a reply as Helpful or Solved in your own created topic, you will be awarding the respondent with the same point values.

  • Quickest method for reading and writing files

    Hi
    I need help regarding file operations.(Reading and Writing). Currently I am using BufferedReader and BufferedWriter to read and write files. But the files (XML) are very huge files(from 30 -50 mb). This is slowing the application to a great extent. Is there any other approach to perform the above mentioned operations on XML files in a fast manner.
    Thank You
    Mansoor.

    Hi
    Can u let me know how to use the java.nio pavkage for primitve data types(int,float..., boolean). I have tried it but found no success.
    Thank You
    Mansoor

  • ImageIo: reading and writing a jpeg corrupts the image

    Sometimes, ImageIo manages to read an image wrong. If I simply read() and write() the
    image without any transformations, the image writtten will have its colors all wrong. The
    output image format here doesn't matter.
    An example image is: http://bram.name/~brama/pics/test.jpg
    And output after reading and writing it: http://bram.name/~brama/pics/test_output.jpg
    Is the image io lib to blame, or is it a broken image? The image displays fine in other programs.
    Message was edited by:
    Bram_A

    Use this code to load the image.
    From my experience it is much more stable and also faster.
    My guess is that the problem is related to the ICC profile embeded in the JPEG.
    JPEGImageDecoder decoder = JPEGCodec.createJPEGDecoder(new URL("http://www.stack.nl/~brama/pics/imageio.jpg").openStream());
    BufferedImage image = decoder.decodeAsBufferedImage();

  • Lightweight library for reading and writing mp3-tags

    Hi,
    I'm currently evaluating libraries for reading and writing mp3-tags. All the projects I found so far where not maintained for a couple of years.
    My question:
    Is there currently a library, which one could call standard for this purpose
    Cheers
    Jonny

    jonnybecker wrote:
    I'm currently evaluating libraries for reading and writing mp3-tags. Don't you rather mean ID3 tags?
    All the projects I found so far where not maintained for a couple of years.It may either be dead, or it may be so finished and free of bugs that no maintenance is needed anymore.
    If you're occurring problems with it and if it is open source you can always consider taking a fork for own development.
    Is there currently a library, which one could call standard for this purposeNo one comes to mind.

  • Very slow painting while reading and writing doubles into file

    for 15MB length file i = 7662080
    for 50MB length file i = 12414368
    Part of Code for writing into file follows like this:
    try{
    fos = new FileOutputStream("Angel.txt");
    File f = new File("Angel.txt");
         if(f.length() >=4)
         f.delete();
    fos = new FileOutputStream("Angel.txt");     
    dos = new DataOutputStream(new BufferedOutputStream(fos,1000000));
    int x=0;
    double y_last, y_new;
    for(int j=0 ;j<i ;j++)
    if(some condition)
    y_new = ....;
    try{
    //previously in vectors
    y_last = y_new;
    vect.add(new Line2D.Double(x, y_last, x, y_new)_;
    dos.writeDouble(y_new);
         }catch(Exception e){System.out.println(e);}
    dos.close();
    fos.close();
    x++;
    }catch(Exception excp){System.out.println(excp);}
    part of code for reading from file follows like this:
    public void paint(Graphics g)
    try{
         double y1, y2 =0;               
         Line2D.Double doub;
         raf = new RandomAccessFile("Angel.txt","r");
         dis = new DataInputStream(new BufferedInputStream(new FileInputStream(raf.getFD(),1000000)));
         raf.seek((rect.x*8));
         for (int i = 0/any value; (i < value as per choice); i++)
              g2.setStroke(new BasicStroke(0)); //2
              y1 = y2;
         y2 =dis.readDouble();
              doub=new Line2D.Double(i,y1,i,y2);
              g2.draw(doub);
    dis.close();
         raf.close();
    }catch(Exception excp){System.out.println(excp);}
    I tried using Object Streams but NotSerializable Exception is thrown as Line2D.Double objects
    are not serialized.
    Any idea to make reading and writing into file specially from MB files faster is appreciated.

    Why are you reading in the file in the paint method ?
    Create your data once before painting.
    I think you should explain what is your goal and what behavior you want.
    Denis

  • Non-Latin Character Display On Web Page

    In a Java web application, only one non-Latin character display issue is that when they are typied into a JSP file. Otherwise, non-Latin characters display correctly from the message property file or from database.
    Anyone know how to solve it?
    Thanks.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Solved!
    Just need to have the JSP page tag on the related JSP file.
    null

    Welcome to our community, Denise
    Perhaps check the names of all the files involved? What type
    of web server are you using?
    You say that your co-worker said she is linking to the skin
    file from a .htm page, but what is missing here is whether she is
    using the .HTM page you provided in the mix or if it's one she
    created herself. If it's one she created herself, that may be the
    issue.
    Cheers... Rick

Maybe you are looking for