Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Use UTF-8 encoding for std{in,out,err} #11168

Closed

Commits on Apr 2, 2013

  1. Flush in File::write when in unbuffered "text" mode

    If the wrapped `QFile` was opened with `QIODevice::Unbuffered`, any
    writes should be unbuffered.  However, as currently implemented,
    using `QTextStream` when the `File` is in "text" mode causes all
    reads/writes to be buffered.
    
    This modification forces a flush in `File::write` if the wrapped
    `QFile` was opened with `QIODevice::Unbuffered`.
    execjosh committed Apr 2, 2013
    Configuration menu
    Copy the full SHA
    8b7110f View commit details
    Browse the repository at this point in the history
  2. Use UTF-8 encoding for std{in,out,err}

    This fixes issue ariya#11162.
    
    `File` constructor takes a `QTextCodec *`, codec; but, if codec is
    `NULL`, then it assumes "binary" mode, which causes non-ASCII
    characters to be converted to NUL (`\0`) in `File::write`.
    
    This change passes the codec for UTF-8 to the `File` constructor for
    the `std{in,out,err}` instances, thus opening them in *text mode*.
    execjosh committed Apr 2, 2013
    Configuration menu
    Copy the full SHA
    b30d320 View commit details
    Browse the repository at this point in the history