Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 92e6b4ec64ce23d4534a55e698266001e4d200be93bd8b3a786aa77a8956de53
Ticket: c4eb46a196227040bfb18770ac261d6836e58f0e
endless loop in gets on encoding error in non blocking mode
User & Date: oehhar on 2023-11-06 14:59:06
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    <H2>Issue</H2>
    *gets* hangs on a non blocking file channel when an encoding error should be reported.
    
    <H2>Example</H2>
    
    <verbatim>
    set f [open test_A_195_B.txt wb]; puts -nonewline $f A\xC3B; close $f
    set f [open test_A_195_B.txt r]
    fconfigure $f -encoding utf-8 -profile strict -blocking 0
    gets $f
    </verbatim>
    
    A file is created with a non continued UTF-8 multi-byte sequence.
    The channel is configured to error out on encoding errors.
    Then, a gets in non-blocking mode is executed.
    
    TCL hangs on the *gets* line.
    
    <H2>Environment</H2>
    
       *   Branch: core-8-branch, tip-653
       *   System: Windows 10 64 bit GER
       *   Compiler: MS-VS 2015 on 32 bit
    
    Thank you all !
    Harald
    
  5. foundin changed to: "core-8-branch"
  6. is_private changed to: "0"
  7. login: "oehhar"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "0f366eb3e9e2fcab52b8ebacd197db9047186a5f"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "oehhar"
  14. subsystem changed to: "24. Channel Commands"
  15. title changed to: "gets blocks on encoding error in non blocking mode"
  16. type changed to: "Bug"