Defect:  Sometimes opened sql/txt files are unreadable in worksheet.

I haven't pinpointed the exact sequence of events yet. Sorry.
I work on two different machines. One: 64bit running Vista. Two: 32bit running XP.
They have the same fonts and operating system languages.
I keep a set of files I'm working on on a usb stick (which appears to be working perfectly).
Sometimes, but not always, when I open up a one of those files on the key, it shows up as square-box gibberish in the sql worksheet window.
I can open the same file with notepad just fine, and paste the contents into the same sql worksheet just fine.
But it's a darned nuisance, not to mention an opportunity to overwrite my work if I forget to close the open file in notepad and save it later.

I've had a few moments to try to track down more info on this problem.
I work on a 64bit vista machine at work and a 32bit windows xp machine at home.
I'm at home, so I'll post what I discovered here, and then post what happens on the 64bit when I get to work tomorrow.
All the files I'm discussing have only the standard ascii characters in them.
Both machines have the same fonts and font setup, and the same OS language. I do not believe this is a font or language issue.
I believe it may be an encoding issue.
I opened up a .txt file with sql developer. It happened to work fine this time.
I opened up the same .txt file with notepad, and saved it to a new .sql extension. It opened fine with sql developer.
I opened up the original .txt file with notepad and saved it to a new .txt filename and chose the unicode encoding instead of the ansi encoding that notepad was defaulting to. I also used notepad to save the file to another .txt file and chose a utf-8 encoding for it.
I opened up the unicode encoding file using sql developer and got gibberish. Upon closer inspection, I could actually read the code in the file, but each character had a box between it. I'll use [] to represent a box. So, my first line looked like this: [] [] []b[]e[]g[]i[]n[].
I opened up the utf encoding file using sql developer and got some gibberish, but most of the file looked fine.
My environment setting had UTF-8 as a setting.
I changed the environment setting to UTF_16, and re-opened the files.
The file saved as unicode is now readable and the other files are now complete gibberish.
I'm guessing that my work machine has a different default encoding scheme at the operating system level, because I believe both are set up with the same settings inside sql developer. (I used the same written instructions for both.)
I'll post what I find at work tomorrow.
If this turns out to be correct, it would be nice if sql developer automatically checked the encoding of the file when it was loaded and acted accordingly. That appears to be a possible course of action, because when I open up each of the encoded files in notepad, it (a) displays each of them correctly automatically and (b) when I do a save as, it shows the encoding the file was last saved in as the default value.

Similar Messages

  • I want to open a txt file and output data through an AO-using DAQmx for PXI

    I have a PXI running a 8145RT CPU. I have a PX6040E Multifunction DAQ card installed in the PXI. I want to program an application where I open a txt file (existing in one of the the RT machines' folders), read the first row, and output its data through an AO channel. The drivers I should use is DAQmx v7.1, and the Labview RT v.7
    Any idea?

    What exactly are you having problems with? Reading a text file can be done a number of ways. Look at the File I/O palette and check out Read Lines From File or Read Characters From File. There are string to number conversion functions on the string palette (i.e. Scan From String). There are also numberous shipping examples on using DAQmx for analog out. If you have a specific problem or question, please post back with additional details.

  • How to write a code for  open new txt file in swing

    hai all,
    now i do one project in java.that project's GUI is Swing. But i don't known swing (basic).So how to write a code for open new txt file and "Open window " in menu item on swing.that means when i click the "New" on menu that time open a new txt file. open also like that type.
    plz give me that code ! very urgent
    Advance Thanks !
    RSK

    Swing Tutorial:
    http://java.sun.com/docs/books/tutorial/uiswing/index.html
    Since you don't know the basic of swing read the tutorial, it is for your own good because it is useless if we provide you with a code you don't even understand and how it works.
    If you want a menu read the tutorial about using menus and for opening a file read using JFileChooser.
    note: don't use the word urgent because it implies that your problem is more important than others.

  • Open all TXT files in Ultraedit

    Currently from the below code I am able to open a new empty file in ultraedit. But I need to open all *.txt files from a particular directory in ultraedit. Could anyone please help me with this.
    private void ueditButActionPerformed(java.awt.event.ActionEvent evt)
         java.awt.EventQueue.invokeLater(new Runnable()
              public void run()
                   try
                        Process procViewEd =Runtime.getRuntime().exec("C:\\Program Files\\UltraEdit\\UEDIT32.EXE ");
                   catch(IOException ioe)
                        System.out.println(ioe.getMessage());
    } For instance, when I click on ueditBut, all the txt files inside the path c:\temp should open in ultraedit.
    Message was edited by:
    Simmy
    Message was edited by:
    Simmy

    As an example, this code opens all of the .java files in the current directory using notepad:import java.io.*;
    public class Test {
        public static void main (String... parameters) throws IOException {
            File currentDir = new File (".");
            File[] javaFiles = currentDir.listFiles (new FilenameFilter () {
                public boolean accept (File parent, String filename) {
                    return filename.endsWith (".java");
            for (File javaFile: javaFiles) {
                Runtime.getRuntime ().exec (String.format ("cmd /c notepad %s", javaFile.getAbsolutePath ()));
    }

  • How can i make my form open a .txt file????

    hi every body,
    i need some help with that..
    i want my form to open a txt file, or at least copy that file from a specific source (windows folder) to a specific destination (another windows folder).
    note that this all will work on the server and the client.
    i hope to find some help.
    thnxxxxxx.
    plzzz i need help, it's a GRADUATE PRODUCT issue.
    sorry i'm not that strong, it gives me error with host command.
    Message was edited by:
    bondo2

    declare
    in_file Text_IO.File_Type;
    out_file Text_IO.File_Type;
    begin
    in_file := Text_IO.Fopen('salary.txt', 'r'); -- open file in read mode
    out_file := Text_IO.Fopen('bonus.txt', 'w'); -- open file in write mode
    end;
    for copy of the file:
    host(copy c:\test.txt c:\new_folder\);
    Hope this helps !!

  • PDF files are unreadable

    I am currently using Adobe Reader 9.2 on a windows xp system.  For many years I had no trouble with Adobe Reader.
    Currently many pdf files are completely unreadable, with some headers appearing normally, but most sections filled with garbage - random appearing ASCII characters.  You can see this in the attached jpg file.
    Oddly enough, if I copy part of the garbage text from Adobe Reader and paste it onto a text reader like Notepad, the text comes out perfectly readable.  Also, pdf documents that are produced in a more photographic (non character) form are perfectly readable.
    I have uninstalled and reinstalled adobe Reader twice with no change in program behavior.  I assume that I have a mysterious font conflict, but I can't figure it out.
    What is going on?

    The files are not corrupted; if I forward an unreadable pdf to another email address and an unaffected computer, the pdf file is completely readable.
    Attached is the header of a typical pdf file opened with a text reader.

  • Unable to open cvirte but files are there

    When I try to run my CVI gui on a new Win7 machine, I get the message "Unable to open C:windows\System32\cvirte\bin\cvirte.rsc".  But when I look in C:windows\System32, that folder and files are there.  I re-installed CVI/RTE 2013 SP2 just in case, but get the same result.  Tried running as an administrator, but get the same thing.  Probably something simple, but thanks for any advice.

    Are you sure it's not the other way around? The files in system32 should be a subset of the files in syswow64, not the other way around. The syswow64 folder has cvirt4.rsc and msrt4.txt, which are not expected to be in the system32 folder. All other files should be the same.
    Assuming the files are installed correctly, then this is going to be a bit trickier to figure out. Do you still have the CVI ADE working successfully in your old computer? If so, can you build a CVI program in that computer (a simple example from the CVI examples folder should do), then copy that program's .exe along with any other needed files, such as .uir files, to the problem computer and try to run the .exe? This will help us narrow down the problem to the ADE or the run-time engine.

  • Is there a way to create a button on the front panel that would automatically open the txt file data is being stored to?

    I am saving data read from FieldPoint to a .txt file. Is there a way to create a button on the front panel so that when the user pushes this button it automatically opens the .txt folder in notepad? I want to bypass the user having to find the file in the computer in order to open it.

    Hi jem,
    I suggest that you break this up into three seperate questions and re-post to this list. That way you get more ideas from others that may have better insites than myself.
    Re:the sysexec
    The Sysexec will allow you to execute a dos command. This is the equivalent of going to
    Start>>>Run
    What you should do is find the proper DOS command sysntax that is required to open a text file in notepad or your favorite editor. Once you know what a good DOS command is, you should pass that string to the Sysexec.VI. The Sysexec has an input that allows you to choose if the code waits for the command to complete or if it should just start the program and let it run in the background. Sysexec will open its own window to run the command you speci
    fiy.
    Ben
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Getting extra line after each record when opening a .txt file in excel

    Hi All,
    I have developed a program which downloads a file at application server.
    each record of file is 500 characters long & have CRLF at end.
    the file looks fine when opened in .txt format.
    however when i download it from application server to presentation server (using function "download to my computer"), & at presentation when i try to open it in excel format, it shows a blank line after every record.
    i don't want this blank line to appear if i download it & open it in excel.
    the file record is declared as char500 type.
    Please suggest how to deal with this.
    thanks in advance.
    Regards,
    Puja.

    Hi Puja,
    Check the file in the application server whether it has any gaps between the lines.
    Or else as you said if the file looks ok in .txt format, download the file in .txt and open the same file in excel (i.e. open with excel)
    Hope this sloves your problem.
    Regards,
    SB.

  • Opening a .txt file from an application

    I have an application that extends JFrame. There is a JButton that I want to use to open a file called
    "Instructions.txt."
    and the path to the file is
    "E:\CM0112\Code\Instructions.txt".
    I want to open this file using TextPad, I have tried the code
    Runtime.getRuntime.().exec()but I keep getting compile errors. Any hints would be greatly appreciated.

    try this code
    public class Open
      public static void main(String[] args)
         String line;
         EasyReader inFile = new EasyReader("instructions.txt")
         if(inFile.bad())
            System.out.println(" *** Can't Open instructions.txt *** ");
            System.exit(1);
         while((line = inFile.readLine()) != null)
           //implement your own code, each time loop executes
           //line is the next line in the file until it is null.
      Go to www.rfrank.net/cs-labs/1400-tasmania/EasyReader.java to find EasyReader.java

  • Open a txt file in a real time PXI target

    I want to open and read a txt file when targeting to a PXI, running a real time OS. The file is saved in a specific directory of the real time machine. When I run the typical Labview (version 7.1) examples there is alwasys an error message.

    Hi Matt,
    I hope you're doing well.  To be able to open files on the host from the RT target or vice-versa, you most likely will need to FTP the files back and forth between the two.  You need to have the files local on either machine to be able to edit or view them, and FTP is the simplest way to do so.  You can connect to your RT target via any standard FTP utility as discussed in this KnowledgeBase article.  I hope this is helpful.  Let us know if you have any additional questions though.
    Thaison V
    Applications Engineer
    National Instruments

  • I want to open a .txt file in the Notepad editor

    Dear all,
    In my java program, when i click on a menu item, i need a .txt file to be opened in the notepad editor. Can someone please send to tell me how?
    Thanks

    Is not very portable to specify the absolute path of notepad. If you pass the program to your friend it might not run!
    I usually specify only the document.txt and the shell exe file (in windows xp cmd.exe), then the operating system think how to open the file. You can setting the operating system to open all the .txt file with notepad. It is very easy.
    The your .txt document in your classpath, so is relative and not absolute.
    Here the code:
    String cmd = "cmd.exe /c start ";
                   String file = "mydocuemnt/manual.txt";
                  try {
                        Runtime.getRuntime().exec(cmd + (ClassLoader.getSystemResource(file)).toString());
                   } catch (IOException ee) {
                        JOptionPane.showMessageDialog(null, "The document dosn't exist!",
                                  "Document not finded!", JOptionPane.ERROR_MESSAGE);
                        ee.printStackTrace();
                   } bye

  • Opening a txt file in my application

    Hi all,
    I am doing a desktop application.My application consist of a Jframe containing a Jtextarea and a Jbutton.what my app does is , it just writes the content of the jtextarea into a txt file and saves it with someother extension.Now on double clicking that txtfile , i want the file to get opened in my app and not in notepad or other things.Please help do that.
    Thanks in advance
    Ravisenan

    Most probably, you can change the default application for a specific file extension using Windows APIs. You need to search for it. And if this can be done for a jar or class file, then you can register your application as the default application of your file type using JNI:
    http://java.sun.com/docs/books/jni/
    I dont think there is a platform independent solution for this.

  • Suddenly can not open a.TXT file... whahoppened?

    Hi,
    I am running latest OSX and my wife was in her account and trying to work. She downloaded a .TXT file that she wanted to open and when she tried it said she didn't have the necessary permissions. She is not an admin on this machine but this used to work in her account and now it doesn't and I can't figure out why!
    HELP

    Have your wife log onto to her account and navigate to the .txt file she downloaded. If it isn't already there, drag it to the Desktop so it's easier to work with. Now, select that file and click Command + I A window will open. Click the pop up menu and click Text Edit.
    Now, go back into the admin account and run Disk Utility and Repair Disk Permissions. Disk Utilities is in your Applications/Utility folder.
    Hope this helps,
    Carolyn

  • Opening an *.txt file in oracle forms 4.5

    I am facing this problem I want to call an text file from a certain location and display the same when an user hits a particular button which has to be done in Oracle Forms 4.5.
    Could u pls help me

    If you want to display the *.txt file use ole object to do that and if you want to read the data from the text file and display in the text field then use textio package.
    Hope this helps you.
    Regards
    Gaurav

Maybe you are looking for

  • Trying to add a new user, but gives unknown error

    Hi Guys, When I go to site actions >> site setting >> site permissions >> and try to add a new user, it gives me "unknown error". Any ideas why this is happening? This is happening only on some of the sites. Thank you.

  • PSE 7 launching problems

    I use XP SP3 and when I click on Photoshop Elements 7 I only get an hourglass for about 3 seconds then nothing happens.  Task Manager thinks PSE is working! Ankush is working on this already and will, I hope, find a solution! Peter

  • Cypress Touchpad - DELL XPS 12

    Hello, I'm owner of a DELL XPS 12 convertable notebook which has as inpunt device an ATMEL maXTouchDigitizer (Touchscreen) and a Cypress touchpad. The touchscreen works like expected, after an installationen of a new Arch Linux System with desktop en

  • Changing service location

    I just moved and updated my service/billing address online... do I actually have to call and have them turn the service on at my new house, or is that sufficient?

  • Pages has frozen

    Pages has frozen and i don't want to shut the program down to find out my report hasn't been saved. Is there a way i can recover pages without deleting my work?