|  | Home · All Classes · Modules

# QLatin1Char Class Reference
[QtCore module]

The QLatin1Char class provides an 8-bit ASCII/Latin-1 character. More...

### Methods

- __init__ (self, char c)
- __init__ (self, QLatin1Char other)
- char toLatin1 (self)
- unsigned long unicode (self)

### Special Methods

- object __repr__ (self)

## Detailed Description

This class can be pickled.

The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.

This class is only useful to avoid the codec for C strings business in the QChar(ch) constructor. You can avoid it by writing QChar(ch, 0).

See also QChar, QLatin1String, and QString.

## Method Documentation

### QLatin1Char.__init__ (self, char c)

Constructs a Latin-1 character for c. This constructor should be used when the encoding of the input character is known to be Latin-1.

### QLatin1Char.__init__ (self, QLatin1Char other)

### char QLatin1Char.toLatin1 (self)

Converts a Latin-1 character to an 8-bit ASCII representation of the character.

### unsigned long QLatin1Char.unicode (self)

Converts a Latin-1 character to an 16-bit-encoded Unicode representation of the character.

### object QLatin1Char.__repr__ (self)