Utl_file.putline  - platform specific line termination character

PUT_LINE terminates the line with the platform-specific line terminator character or characters.
But the porblem is this.
The file generator application can run in different platform,and hence it means I can have different line termination character.Is there anyway I can force it to generate Unix only line termination character (line termination char in Unix I guess is \n) .
In short programatically I want to control it.
I looked at UTL_FILE.PUTLINE but it doesnt have any option to control the line termination char.
Help.

here is the example, i am on HP UNIX
SQL> DECLARE
  2     l_text   VARCHAR2 (32767);
  3     v_file   UTL_FILE.FILE_TYPE;
  4  BEGIN
  5   -- OPEN FILE to write
  6     v_file :=  UTL_FILE.FOPEN (LOCATION          => 'NOTIFICATION',
  7                        filename          => 'Test.txt',
  8                        open_mode         => 'w',
  9                        max_linesize      => 32767
10                       );
11     UTL_FILE.PUT(v_file,'Hello' || CHR(10));
12 
13     UTL_FILE.PUT(v_file,'how are you' || CHR(10));
14 
15     UTL_FILE.PUT(v_file,'I am fine' || CHR(10));
16     UTL_FILE.FCLOSE (v_file);
17    ---- open file to read
18    v_file := UTL_FILE.FOPEN (LOCATION          => 'NOTIFICATION',
19                        filename          => 'Test.txt',
20                        open_mode         => 'r'
21                       
22                       );
23     BEGIN
24        LOOP
25           UTL_FILE.GET_LINE (v_file, l_text, 32767);
26           DBMS_OUTPUT.PUT_LINE (l_text);
27        END LOOP;
28     EXCEPTION
29        WHEN NO_DATA_FOUND
30        THEN
31           NULL;
32     END;
33      -- READ LAST LINE
34    -- DBMS_OUTPUT.PUT_LINE ('Last Line : |' || l_text || '|');
35     UTL_FILE.FCLOSE (v_file);
36  EXCEPTION
37     WHEN OTHERS
38     THEN
39        UTL_FILE.FCLOSE (v_file);
40  END;
41  /
Hello
how are you
I am fine
PL/SQL procedure successfully completed.
SQL> ed
Wrote file afiedt.buf
  1  DECLARE
  2     l_text   VARCHAR2 (32767);
  3     v_file   UTL_FILE.FILE_TYPE;
  4  BEGIN
  5   -- OPEN FILE to write
  6     v_file :=  UTL_FILE.FOPEN (LOCATION          => 'NOTIFICATION',
  7                        filename          => 'Test.txt',
  8                        open_mode         => 'w',
  9                        max_linesize      => 32767
10                       );
11     UTL_FILE.PUT(v_file,'Hello');
12     UTL_FILE.PUT(v_file,'how are you' );
13     UTL_FILE.PUT(v_file,'I am fine' );
14     UTL_FILE.FCLOSE (v_file);
15    ---- open file to read
16    v_file := UTL_FILE.FOPEN (LOCATION          => 'NOTIFICATION',
17                        filename          => 'Test.txt',
18                        open_mode         => 'r'
19                       );
20     BEGIN
21        LOOP
22           UTL_FILE.GET_LINE (v_file, l_text, 32767);
23           DBMS_OUTPUT.PUT_LINE (l_text);
24        END LOOP;
25     EXCEPTION
26        WHEN NO_DATA_FOUND
27        THEN
28           NULL;
29     END;
30      -- READ LAST LINE
31    -- DBMS_OUTPUT.PUT_LINE ('Last Line : |' || l_text || '|');
32     UTL_FILE.FCLOSE (v_file);
33  EXCEPTION
34     WHEN OTHERS
35     THEN
36        UTL_FILE.FCLOSE (v_file);
37* END;
38  /
Hellohow are youI am fine
PL/SQL procedure successfully completed.

Similar Messages

  • Setting Line Terminator for a CLOB column by script

    Hello Everyone,
    I have a CLOB column in my table that receives external data (more than 400 sources).
    The GUI application displays it in different ways because of the multiple incoming Line Terminators.
    Here is the weird thing:
    In SQL developper 3.1.06. In the Preferences->Environment I selected as Line Terminator: Carriage Return and Line Fe(Windows)
    Once I committed the changes the data was properly displayed in the application (apparently was also re-coded).
    My Question is:
    How can I setup this property on the column or table to fix the issue??
    (I'm looking for a DDL script or something alike).
    Thanks in advance.
    Mijail O. T.

    914451 wrote:
    If that's the case, What is the SQL DEveloper doing then??
    I tested and looks like is a global parameter, not sure if works only for the table. (That what I need).
    If is possible to setup this feature from the GUI it should be a way to do it running a Script.
    Right????No.
    Tables don't have any concept of "lines".
    CLOB's don't have any concept of "lines".
    "lines" only exist in the context of the data you are providing, but that's not of concern to the database.
    So it looks like, what SQL Developer is doing (I assume as I don't use it), is to have a setting such that when it comes to display character data from VARCHAR2's or CLOB's it determines if there are CR/LF or just LF characters (as per the setting) and then uses those as line terminators for displaying the data in it's own interface. Thus it sounds like an interface specific setting, or to put it bluntly, it's something that is a part of SQL Developer to control how it displays things.
    Have you tried querying back the raw version of the data from the database to see that it still has the CR/LF characters in it? It should.
    I think you'll find the setting is a "display" setting, not a "alter my data" setting.

  • Line Terminator

    The preference change for line terminator in the environmental settings doesn't seem to change the line terminator for table file exports (for example INSERT). I don't get separate lines when viewed by MS Notepad no matter which setting I use, there is a null string marker (small square). I was trying this since there seems to be an error in the export using the Clipboard. SQL Developert 1.1.1.25.14 using the included JDK.
    What can I do to fix this?
    Thanks!
    -Jim

    You're right, I just had a readable export and it seems to be the same where I choose LF or LF/CR or Platform Default for exporting to a file. The 1.1.1 version didn't put any line terminator in and you got either one or two null string markers ( the little square box character shows) and it line wrapped continously. Now I get line breaks but it doesn't vary. The export function inproved but did not allow changing the option.
    The Export DDL (and Data) doesn't substitute in for the line terminator at all though and it shows the null string markers.
    So it seems to be only partially fixed for file export.

  • Utl_file.utl_raw adds a line feed at the end of the line. How to avoid it.

    utl_file.utl_raw adds a line feed at the end of the line. I have to send some binary files to my vendor and they do not want a line feed at the end of the line.
    When I execute the sample program below, it creates a file with a line feed(chr(10)) at the end of the line. When I do dump in hexa, it shows a character x0A
    How to avoid the line feed at end of line?
    We are using Oracle 9i on unix platform.
    declare
    l_output           utl_file.file_type;
    v_raw      raw(32767);
    v_trlr_rec_code      VARCHAR2(2);
    v_trlr_evnt_title      VARCHAR2(6);
    begin
    l_output := utl_file.fopen( 'RM_MHE_IN_DIR', 'abc.dat', 'w', 14 );
    v_trlr_rec_code      := '99';
    v_trlr_evnt_title      := 'STARTD';
    v_raw := HEXTORAW(v_trlr_rec_code) || utl_raw.cast_to_raw(v_trlr_evnt_title);
    utl_file.put_raw( l_output, v_raw );
    utl_file.fflush( l_output );
    utl_file.fclose( l_output );
    dbms_output.put_line( utl_raw.cast_to_varchar2( v_raw ) );
    EXCEPTION
    WHEN OTHERS THEN
         dbms_output.put_line( sqlerrm );
    end;
    /

    oops, sorry i overlooked the fact that the db is 9i; thanks for pointing it out Solomon.
    Not sure about this, but a workaround could be to remove the "\n" characters at the end of each line using one of the many Unix utilities after the file has been created.
    isotope

  • How to go to a specific line # in java?

    Hi,
    I have located a keyword in a file using the bufferredreader class (by reading line by line and searching for the keyword).
    This method returns the # of the line that contains the keyword. Say this method return 'n'. I need to pass this information to another method and have it skip the first 'n' lines and start reading from the (n+1)th line.
    I have not found this capability in the Bufferredreader class nor other classes in Java that I looked at. Do you know of any filereader class that does that?
    Note that my intent is to delete the line that contains this keyword. The way I am thinking of right now is to find the line, pass its line # to another method and have that method line (n)th with (n+1)th sequentially to the end of the file. Would you suggest a better way of approaching the problem all together?
    Thanks,
    parachuter2b

    bckrispi is right ! This is a small part of a pretty big server/client program that has to be platform independable as well.
    mchan0 :
    so this is not useful? rather then have the second program re-read, you >could output the rest of the file to a new file without the first n lines?
    java.lang.Object
    java.io.Reader
    java.io.BufferedReader
    readLine
    public String readLine()
    throws IOExceptionRead a line of text. A line is considered to be terminated >by any one of a line feed ('\n'), a carriage return ('\r'), or a carriage return >followed immediately by a linefeed.
    Returns:
    A String containing the contents of the line, not including any >line-termination characters, or null if the end of the stream has been >reached
    Throws:
    IOException - If an I/O error occursI need to delete only that one line from the file...so would need to retain the first n-1 lines and (n+1)th till the end of the file.
    cotton.m:
    Note that my intent is to delete the line that
    contains this keyword.
    This actually concerns me more than your current problem.Do you mean there's a better way of going about this problem or something else? sorry ! I don't quite get what you mean.

  • Different line terminator for SocketChannel

    Any ideas on how to specify a different line terminator than '\n' for the SocketChannel.read() method, such as ASCII character 127?

    Ok..and here's a third answer....
    Socket s= my_socket_channel.socket();
    InputStreamReader isr = new InputStreamReader(s.getInputStream());
    String a_line="";
    boolean reading=true;
    while (reading)
      int c = isr.read();
      if (c==-1) {if (!a_line.equals("")){process(a_line);}
                     reading=false;}
      if (c==127){process(a_line); a_line="";}
      else{
            char cc = (char)c;
            a_line=a_line+cc;
    }How does that sound?

  • Termination character

    Hello,
    I'm communicating with an 20 years old optical spectrum analyzer with GPIB connection using VISA.
    I having trouble reading the entire data. I've try to use the termination character options to solve this but my instrument use both line feed and EOI termination codes.
    I've found this help text: http://www.ni.com/white-paper/4256/en/
    but could understand it to the end.
    what is the symbol accepting the arrow symbol at and zero constant at the end? where should I put this property node in case I want to read many bytes ending with the above characters? before VISA - WRITE? after VISA read? and how can I combine two termination character? how do I represent two EOI?
    thanks, Avishay

    Specify too many bytes to read and the visa read wil stop on the first end character or eoi that appears.
    For two eoi's read twice.
    greetings from the Netherlands

  • How can I define more than one termination character for RS-232 interface communication?

    Hi,
    I have to communicate through the PC's RS-232 interface with a microprocessor board. I am using the "Advanced Serial Write and Read.vi" out of the LabVIEW examples and it works on principle.
    My problem is the termination character: It looks like I just can set one termination character, EITHER 0xA (so LF / newline) OR 0xD (CR / carriage return), but I have the need to react on various termination characters like "<CR> <LF> <CR> <LF> OK <CR> <LF>" or "<CR> <LF> <LF>"; which I would like to set in a control (this VI will be used in a TestStand sequence).
    Is there a way to do that, so that I can set wichever termination character(s) I need? The property node in "VISA configure serial port" just accepts an unsigned integer, nothing else. Sure I can get it running with the timeout - but this is not very nice and extends testing time unnecessarily.
    Thanks & Regards!
    Regards,
    gedi
    Solved!
    Go to Solution.

    That would be for the write. The poster is asking about the read. For the read you will need to write your own read routine. You will basically need to use a loop and inside the loop use the VISA Bytes at Serial Port to see if there's any bytes available. Read that many bytes, and append them to a string that you build up in a shift register. After concatenation check to see if you've got the termination characters. If so, the read is done. Fairly simple. Be sure to turn off the termination character enable in the VISA Configure.

  • How to read a specific line of a .dat file?

    can we read a specific line of a .dat file, if so, how?
    i have this .dat files for each customer, which contain their name on the first line, their id on the second line
    and a list of items and an item id between each item.
    John Doe
    455689
    milk
    1
    orange
    9
    Here is what I am trying to do, please correct me
    //list out .dat file in dir
    File customer_dir = new File ("Customer")
    if (customer_dir.isDirectory())
    String[] listofdat=dir.list();
    for (int i=0;i<listofdat.length();i++)
    Scanner dat_read = new Scanner (new File listfodat);
    dat_read.nextLine();
    if (dat_read.nextLine().equals("455689")) <--is this okay?

    bibiancheng wrote:
    would you please explain to me what
    String[] tokens = line.trim().split("\\s*,\\s*")"\\s*,\\s*" is a regex where \\s means whitespace and the * means "any number of".
    so \\s* means that it will grab all the whitespace if there is any.
    trim() removes white space from the beginning and end of the string.
    dont put a comma in the name.
    spaces allowed: "jane doe, 12-14-09, 428438, 6, 388473, 7, 187374, 3"
    it was just a recommendation. breaking it into separate lines would be fine.

  • Editable ALV - how to throw an error message for a specific line & field

    Hi all,
    I've implemented an editable ALV and also the ON_DATA_CHECK event to check the values, entered in the ALV. So this works fine and I can check the values.
    But now, I want to throw an error message corresponding to the field in the ALV, where the error occured.
    How can I throw this error message corresponding to a specific line/field in the ALV?
    I was using REPORT_ATTRIBUTE_ERROR_MESSAGE and REPORT_ELEMENT_ERROR_MESSAGE but without success.
    I'm also using a loop over the "CHANGES" in the ALV and within this loop, I use
    elem_alv = node_alv->get_element( index = <change>-element_index ) 
    to get the element for the message.
    CALL METHOD lo_message_manager->REPORT_ELEMENT_ERROR_MESSAGE
      EXPORTING
        MESSAGE_TEXT              = 'my message'
        ELEMENT                   = elem_alv
    *    ATTRIBUTES                =
    *    PARAMS                    =
    *    MSG_USER_DATA             =
    *    IS_PERMANENT              = ABAP_FALSE
    *    SCOPE_PERMANENT_MSG       = CO_MSG_SCOPE_CTXT_ELEMENT
    *    MSG_INDEX                 =
    *    CANCEL_NAVIGATION         =
    *    IS_VALIDATION_INDEPENDENT = ABAP_FALSE.
    2.) is it right, that for an editable ALV, I can't use the WDDOBEFOREACTION to do the checks?
    If I try to use this, I can't get the values of my ALV table to check it.
    Thanks,
    Andreas

    Hi Andreas,
    I have tried to replicate your problem and I am getting the desired output. I have a row by name TEMP_NEW in my ALV and I want to throw an error message whenever the user enters a value of 4 for that particular field. Please find my coding as below. The important thing is where we perform the actual comparison between the r_value and 4. r_value is defined in SALV_WD_S_TABLE_MOD_CELL as reference to type DATA. So suppose the user enters a value of say 3 in the TEMP_NEW field of the ALV then r_value would contain 3 but if you observe its type in debugging mode it would be as TYPE REF TO I and not TYPE I. So you cannot directly say something like:
    "if ls_modified_cells-r_value = 3" as this would lead to a syntax error. Define a field-symbol say <temp> and then use it to get the actual value into it by saying like:
    ASSIGN ls_modified_cells-r_value->* TO <temp>.
    Then you can use this <temp> for comparison in your IF statement like:
    IF  <temp> = 3.
    Find the entire coding as below:
    METHOD check_data.
      DATA: lr_node TYPE REF TO if_wd_context_node,
            lr_element TYPE REF TO if_wd_context_element,
            ls_modified_cells TYPE salv_wd_s_table_mod_cell.
      FIELD-SYMBOLS <temp> TYPE data.
    " get message manager
      DATA lo_api_controller     TYPE REF TO if_wd_controller.
      DATA lo_message_manager    TYPE REF TO if_wd_message_manager.
      lo_api_controller ?= wd_this->wd_get_api( ).
      CALL METHOD lo_api_controller->get_message_manager
        RECEIVING
          message_manager = lo_message_manager.
      lr_node = wd_context->get_child_node( name = 'NODE' ).
      LOOP AT r_param->t_modified_cells INTO ls_modified_cells.
        lr_element = lr_node->get_element( index = ls_modified_cells-index ).
        IF ls_modified_cells-attribute = 'TEMP_NEW'.
    " Get the value extracted into the field symbol from the reference variable
          ASSIGN ls_modified_cells-r_value->* TO <temp>.
    " Use the value present in this field-symbol for your comparison
          IF  <temp> = 4.
    " report message
            CALL METHOD lo_message_manager->report_attribute_error_message
              EXPORTING
                message_text   = 'Sample message text'
                element        = lr_element
                attribute_name = ls_modified_cells-attribute.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDMETHOD.
    Hope this helps resolve your problem.
    Regards,
    Uday

  • Provision that MRP is not be considered for specific line item of Sales Ord

    Is their any provision that MRP is not be considered for specific line item of Sales Order in MRP run? (Ex: Planned order is also generated for free/ADC sample quantity entered in Sales order)

    Dear
    Go to Sales and distribution--> Sales --> Sales Documents -->Schedule Lines --> Assign schedule line categories.
    Choose the item category (eg. TAN)  which is coming in the sales order and enter CN - No. Mat. Planning in the the manual schedule line category (MSL Ca) for MRP type PD.
    This will enable you to choose while creating sales order in the Tab procurement column SL Ca.
    Choose CN - No mat.planning for the schedule items which you don;t want MRP.
    Regards
    Soundar

  • Having trouble reading specific lines from a text file and displaying them in a listbox

    I am trying to read specific lines from all of the text files in a folder that are reports. When I run the application I get the information from the first text file and then it returns this error: "A first chance exception of type 'System.ArgumentOutOfRangeException'
    occurred in mscorlib.dll"
    Below is the code from that form. 
    Option Strict On
    Option Infer Off
    Option Explicit On
    Public Class frmInventoryReport
    Public Function ReadLine(ByVal lineNumber As Integer, ByVal lines As List(Of String)) As String
    Dim intTemp As Integer
    intTemp = lineNumber
    Return lines(lineNumber - 1)
    lineNumber = intTemp
    End Function
    Public Function FileMatches(ByVal folderPath As String, ByVal filePattern As String, ByVal phrase As String) As Boolean
    For Each fileName As String In IO.Directory.GetFiles(folderPath, filePattern)
    If fileName.ToLower().Contains(phrase.ToLower()) Then
    Return True
    End If
    Next
    Return False
    End Function
    Private Sub frmInventoryReport_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim intcase As Integer = 1
    Dim strTemp, strlist, strFile As String
    Dim blnCheck As Boolean = True
    strFile = "Report Q" & intcase.ToString & ".txt"
    Do While blnCheck = True
    strFile = "Report Q" & intcase.ToString & ".txt"
    Dim objReader As New System.IO.StreamReader("E:\Furry Friends Animal Shelter Solution\Furry Friends Animal Shelter\" & strFile)
    Dim allLines As List(Of String) = New List(Of String)
    Do While objReader.Peek <> -1
    allLines.Add(objReader.ReadLine())
    Loop
    objReader.Close()
    strlist = ReadLine(1, allLines) & "" & ReadLine(23, allLines)
    lstInventory.Items.Add(strlist)
    intcase += 1
    strTemp = intcase.ToString
    strFile = "Report Q" & intcase.ToString & ".txt"
    blnCheck = FileMatches("E:\Furry Friends Animal Shelter Solution\Furry Friends Animal Shelter\", "*.txt", intcase.ToString)
    Loop
    End Sub
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim intcase As Integer = 1
    Dim strTemp, strlist, strFile As String
    Dim blnCheck As Boolean = True
    strFile = "Report Q" & intcase.ToString & ".txt"
    Do While blnCheck = True
    strFile = "Report Q" & intcase.ToString & ".txt"
    Dim objReader As New System.IO.StreamReader("E:\Furry Friends Animal Shelter Solution\Furry Friends Animal Shelter\" & strFile)
    Dim allLines As List(Of String) = New List(Of String)
    Do While objReader.Peek <> -1
    allLines.Add(objReader.ReadLine())
    Loop
    objReader.Close()
    strlist = ReadLine(1, allLines) & "" & ReadLine(23, allLines)
    lstInventory.Items.Add(strlist)
    intcase += 1
    strTemp = intcase.ToString
    strFile = "Report Q" & intcase.ToString & ".txt"
    blnCheck = FileMatches("E:\Furry Friends Animal Shelter Solution\Furry Friends Animal Shelter\", "*.txt", intcase.ToString)
    Loop
    End Sub
    End Class
    Sorry I'm just beginning coding and I'm still a noob. Any help is appreciated. Thank you!

    Ok, so if I'm following this correctly you should be able to just loop through all of the files in that folder whose file name matches the pattern and then read the first 22 lines, recording only the first and the last.
    Exactly how you store the animal data probably depends on how you are going to display it and what else you are going to do with it.  Is there anything other than name and cage number that should be associated with each animal?
    You might want to make a dataset with a datatable to describe the animal, or you might write a class, or you might just use something generic like a Tuple.  Here's a simple class example:
    Public Class Animal
    Public Property Name As String
    Public Property Cage As String
    Public Overrides Function ToString() As String
    Return String.Format("{0} - {1}", Name, Cage)
    End Function
    End Class
    With that you can use a routine like the following to loop through all of the files and read each one:
    Dim animals As New List(Of Animal)
    Dim folderPath As String = "E:\Furry Friends Animal Shelter Solution\Furry Friends Animal Shelter\"
    For Each filePath As String In System.IO.Directory.GetFiles(folderPath, "Report Q?.txt")
    Using reader As New System.IO.StreamReader(filePath)
    Dim lineIndex As Integer = 0
    Dim currentAnimal As New Animal
    While Not reader.EndOfStream
    Dim line As String = reader.ReadLine
    If lineIndex = 0 Then
    currentAnimal.Name = line
    ElseIf lineIndex = 22 Then
    currentAnimal.Cage = line
    Exit While
    End If
    lineIndex += 1
    End While
    animals.Add(currentAnimal)
    End Using
    Next
    'do something to display the animals list
    Then you might bind the animals list to a ListBox, or loop through the list and populate a ListView.  If you decided to fill a datatable instead of making Animal instances, then you might bind the resulting table to a DataGridView.
    There are lots of options depending on what you want and what all you need to do.
    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

  • Why do I get a "termination character was read" warning with VISA read and TCPIP?

    I am using VISA Reads with TCPIP raw sockets without issue with NI-VISA 3.0.1 but when I moved to NI-VISA 4.4 I was getting timeout errors.   The timeout errors went away when I set the termination character enable property to true (which seemed to be default in NI-VISA 3.0.1), but now I get a warning stating that the "termination character was read".   
    Can I disable this warning?   Can I set the termination character enable to default?   How can I get rid of this annoying warning?
    Solved!
    Go to Solution.

    Hey Dagwood,
    Unfortunately there isn't a way to globally change the attribute VI_ATTR_TERMCHAR_EN to VI_TRUE.  I spoke with R&D about possible use of the registries and they say it's not accessible through that.  To address why this change was made, the developer who made the switch isn't around anymore so I can't find his reasoning as an explanation for you.  The best this for you to do in your code would be while initializing, use the VISA Property Node to make the change and until that VISA Resource is closed, this change will remain set to the value you assign.  I'm sorry we cannot provide any other solution for this inconvenience.  Also, if you feel this is a large burden on your programming practice you can definitely submit a product suggestion for the ability to change global default values for VISA attributes.
    Thanks,
    David Pratt
    AES - Test Side Products
    NIC

  • Is there a way to specify text-to-speech to dictate a specific line or..

    Hi guys,
    Is there a way to specify text-to-speech to dictate a specific line or page in a pdf file?
    In fact, it would be cool if text-to-speech highlighted each word that is being spoken through out the document during dictation and you could rewind, pause or fastforward the speech in real-time. Is this feature available? if not, can anyone recommend any other programs that can do this?
    thanx in advance

    Is there a way to specify text-to-speech to dictate a specific line or page in a pdf file?
    Yes!
    With fully modern Cocoa applications (like Safari, Preview, TextEdit, and Mail) you can select the line or page and then from the application menu > Services > Speech > Start Speaking Text
    You can also select and then Control-Click on the selection and then pick Speech > Start Speaking Text from the contextual menu. (Works with Safari, TextEdit, and Mail, but not Preview for PDF.)
    In fact, it would be cool if text-to-speech
    highlighted each word that is being spoken through
    out the document during dictation and you could
    rewind, pause or fastforward the speech in real-time.
    That would be cool. Are you looking for an interface enhancement, or would a talking book reader with these features be acceptable?
    Is this feature available?
    No, but you can get somewhat close to this ideal by using VoiceOver and checking Show Caption Panel.
    if not, can anyone recommend any other programs that can do this?
    I have had fair success with the Text Help Read & Write Aloud products.
    http://www.texthelp.com/rwm.asp?q1=products&q2=rwm
    eMac 1.42   Mac OS X (10.4.6)   I paid the going Windows price for a screen reader and got a free computer!

  • Java NIO Platform Specific Quirks & Solutions

    I have been working with the NIO library recently, and I was disapointed to find that there are many little platform specific quirks. It is hard to design a program that can handle diffrent platforms when you have to do switches to handle the many little quirks. While I have only found 2, I suspect there are more. I invite others to post about NIO quirks and a possible solution if one is known.
    Quirk #1:
    On Win98, the a key is only readable once the first time the key is writable, while on WinXP, the key is flagged writable every time it is writable.
    Proposed Solution:
    Design a program which only expects the key to writable once on connection, and forget about other calls (since they cannot be expected on every OS)???
    Quirk #2:
    (Note: check out the topic NIO Non-Blocking Server not Reading from Key (http://forum.java.sun.com/thread.jsp?forum=31&thread=327241) for more info...)
    On WinXP, a key which is registered both OP_READ and OP_WRITE doesnt flag any read requests, even if input does come to the server.
    Possible Solution:
    See other fourm for details.

    Also... I dont have a Linux dev-box to test this stuff on... If anyone runs into things relating to the above quirks on OS's not mentioned, please post the os, and how the quirk is handled.

Maybe you are looking for