• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

12.9 Foreign access to Prolog IO streams
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • Foreign Language Interface
        • Foreign access to Prolog IO streams
          • Get IO stream handles
          • Creating an IO stream
          • Interacting with foreign streams
          • Foreign stream error handling
          • Foreign stream encoding
          • Foreign stream line endings
          • Foreign stream position information
          • Support functions for blob save/load
    • Packages
ss="func" href="foreign-streams.html#Ssetenc()">Ssetenc() which is available from Prolog using the set_stream/2encoding(Encoding) property. Functions that explicitly manage the encoding are:
int Ssetenc(IOSTREAM *s, IOENC new_enc, IOENC *old_enc)
Set the encoding for s to new_enc and, if old_enc is not NULL, return the old encoding. This function may fail, returning -1 if the Scontrol_function() of the stream returns -1 on the SIO_SETENCODING request. On succcess it returns 0. If new_enc is ENC_OCTET the stream is switched to binary mode. Otherwise text mode is enabled.
int ScheckBOM(IOSTREAM *s)
This function may be called on a buffered input stream immediately after opening the stream. If the stream starts with a known Byte Order Mark (BOM) the encoding is set accordingly and the flag SIO_BOM is set on the stream. Possibly resulting en
ClioPatria (version V3.1.1-42-gd6a756b-DIRTY)