## Text Text |

## Functions

GsfInput * | gsf_input_textline_new ()
unsigned char * | gsf_input_textline_ascii_gets ()
guint8 * | gsf_input_textline_utf8_gets ()
GsfOutput * | gsf_output_iconv_new ()
gboolean | gsf_output_csv_write_eol ()
gboolean | gsf_output_csv_write_field ()

## Properties

char * | fallback | Read / Write
char * | input-charset | Read / Write / Construct Only
char * | output-charset | Read / Write / Construct Only
GsfOutput * | sink | Read / Write / Construct Only
char * | eol | Read / Write / Construct
char * | quote | Read / Write / Construct
GsfOutputCsvQuotingMode | quoting-mode | Read / Write / Construct
gboolean | quoting-on-whitespace | Read / Write
char * | quoting-triggers | Read / Write
char * | separator | Read / Write / Construct
GsfOutput * | sink | Read / Write

## Types and Values

| GsfInputTextline
| GsfOutputIconv
| GsfOutputCsv
enum | GsfOutputCsvQuotingMode

## Object Hierarchy

        GObject
        ├── GsfInput
        │   ╰── GsfInputTextline
        ╰── GsfOutput
            ├── GsfOutputCsv
            ╰── GsfOutputIconv

## Description

## Functions

### gsf_input_textline_new ()

    GsfInput *
    gsf_input_textline_new (GsfInput *source);

This adds a reference to `source`.

#### Parameters

source | in some combination of ascii and utf8 |

#### Returns

a new file.

[nullable]

### gsf_input_textline_ascii_gets ()

    unsigned char *
    gsf_input_textline_ascii_gets (GsfInputTextline *textline);

A utility routine to read things line by line from the underlying source. Trailing newlines and carriage returns are stripped, and the resultant buffer can be edited.

#### Parameters

textline | GsfInputTextline |

#### Returns

the string read, or `NULL` on eof.

[array][transfer none][nullable]

### gsf_input_textline_utf8_gets ()

    guint8 *
    gsf_input_textline_utf8_gets (GsfInputTextline *textline);

A utility routine to read things line by line from the underlying source. Trailing newlines and carriage returns are stripped, and the resultant buffer can be edited.

#### Parameters

textline | GsfInputTextline |

#### Returns

the string read, or `NULL` on eof.

[array][transfer none][nullable]

### gsf_output_iconv_new ()

    GsfOutput *
    gsf_output_iconv_new (GsfOutput *sink,
                          char const *dst,
                          char const *src);

Adds a reference to `sink` .

#### Parameters

sink | The underlying data source. |
dst | The target character set. |
src | The source character set. |

#### Returns

a new GsfOutput object or `NULL`.

### gsf_output_csv_write_eol ()

    gboolean
    gsf_output_csv_write_eol (GsfOutputCsv *csv);

### gsf_output_csv_write_field ()

    gboolean
    gsf_output_csv_write_field (GsfOutputCsv *csv,
                                char const *field,
                                size_t len);

## Types and Values

### GsfInputTextline

    typedef struct _GsfInputTextline GsfInputTextline;

### GsfOutputIconv

    typedef struct _GsfOutputIconv GsfOutputIconv;

### GsfOutputCsv

    typedef struct _GsfOutputCsv GsfOutputCsv;

### enum GsfOutputCsvQuotingMode

Controls when to add quotes around fields.

#### Members

GSF_OUTPUT_CSV_QUOTING_MODE_NEVER | never add quotes around fields |
GSF_OUTPUT_CSV_QUOTING_MODE_AUTO | add quotes around fields when needed |
GSF_OUTPUT_CSV_QUOTING_MODE_ALWAYS | always add quotes around fields |

## Property Details

### The `“fallback”` property

      “fallback”                 char *

Either NULL or a UTF-8 string (representable in the target encoding) to convert and output in place of characters that cannot be represented in the target encoding. NULL means use \u1234 or \U12345678 format.

Owner: GsfOutputIconv

Flags: Read / Write

Default value: NULL

### The `“input-charset”` property

      “input-charset”            char *

The character set to convert from.

Owner: GsfOutputIconv

Flags: Read / Write / Construct Only

Default value: "UTF-8"

### The `“output-charset”` property

      “output-charset”           char *

The character set to convert to.

Owner: GsfOutputIconv

Flags: Read / Write / Construct Only

Default value: "UTF-8"

### The `“sink”` property

      “sink”                     GsfOutput *

Where the converted data is written.

Owner: GsfOutputIconv

Flags: Read / Write / Construct Only

### The `“eol”` property

      “eol”                      char *

The end-of-line marker.

Owner: GsfOutputCsv

Flags: Read / Write / Construct

Default value: "\n"

### The `“quote”` property

      “quote”                    char *

The string used for quoting fields.

Owner: GsfOutputCsv

Flags: Read / Write / Construct

Default value: "\""

### The `“quoting-mode”` property

      “quoting-mode”             GsfOutputCsvQuotingMode

When to quote fields.

Owner: GsfOutputCsv

Flags: Read / Write / Construct

Default value: GSF_OUTPUT_CSV_QUOTING_MODE_NEVER

### The `“quoting-on-whitespace”` property

      “quoting-on-whitespace”    gboolean

Does initial or terminal whitespace force quoting?.

Owner: GsfOutputCsv

Flags: Read / Write

Default value: TRUE

### The `“quoting-triggers”` property

      “quoting-triggers”         char *

Characters that cause field quoting.

Owner: GsfOutputCsv

Flags: Read / Write

Default value: NULL

### The `“separator”` property

      “separator”                char *

The field separator.

Owner: GsfOutputCsv

Flags: Read / Write / Construct

Default value: ","

### The `“sink”` property

      “sink”                     GsfOutput *

Where the formatted output is written.

Owner: GsfOutputCsv

Flags: Read / Write