cgroups

title: cgroups(7)

summary: Linux control groups

text:
# cgroups(7)

## NAME
cgroups - Linux control groups

## DESCRIPTION
Control groups, usually referred to as cgroups, are a Linux kernel feature which allow processes to be organized into hierarchical groups whose usage of various types of resources can then be limited and monitored. The kernel's cgroup interface is provided through a pseudo-filesystem called cgroupfs. Grouping is implemented in the core cgroup kernel code, while resource tracking and limits are implemented in a set of per-resource-type subsystems (memory, CPU, and so on).

### Terminology
A cgroup is a collection of processes that are bound to a set of limits or parameters defined via the cgroup filesystem.

A subsystem is a kernel component that modifies the behavior of the processes in a cgroup. Various subsystems have been implemented, making it possible to do things such as limiting the amount of CPU time and memory available to a cgroup, accounting for the CPU time used by a cgroup, and freezing and resuming execution of the processes in a cgroup. Subsystems are sometimes also known as resource controllers (or simply, controllers).

The cgroups for a controller are arranged in a hierarchy. This hierarchy is defined by creating, removing, and renaming subdirectories within the cgroup filesystem. At each level of the hierarchy, attributes (e.g., limits) can be defined. The limits, control, and accounting provided by cgroups generally have effect throughout the subhierarchy underneath the cgroup where the attributes are defined. Thus, for example, the limits placed on a cgroup at a higher level in the hierarchy cannot be exceeded by descendant cgroups.

### Cgroups version 1 and version 2
The initial release of the cgroups implementation was in Linux 2.6.24. Over time, various cgroup controllers have been added to allow the management of various types of resources. However, the development of these controllers was largely uncoordinated, with the result that many inconsistencies arose between controllers and management of the cgroup hierarchies became rather complex. A longer description of these problems can be found in the kernel source file Documentation/admin-guide/cgroup-v2.rst (or Documentation/cgroup-v2.txt in Linux 4.17 and earlier).

Because of the problems with the initial cgroups implementation (cgroups version 1), starting in Linux 3.10, work began on a new, orthogonal implementation to remedy these problems. Initially marked experimental, and hidden behind the -o __DEVEL__sane_behavior mount option, the new version (cgroups version 2) was eventually made official with the release of Linux 4.5. Differences between the two versions are described in the text below. The file cgroup.sane_behavior, present in cgroups v1, is a relic of this mount option. The file always reports "0" and is only retained for backward compatibility.

Although cgroups v2 is intended as a replacement for cgroups v1, the older system continues to exist (and for compatibility reasons is unlikely to be removed). Currently, cgroups v2 implements only a subset of the controllers available in cgroups v1. The two systems are implemented so that both v1 controllers and v2 controllers can be mounted on the same system. Thus, for example, it is possible to use those controllers that are supported under version 2, while also using version 1 controllers where version 2 does not yet support those controllers. The only restriction here is that a controller can't be simultaneously employed in both a cgroups v1 hierarchy and in the cgroups v2 hierarchy.

## CGROUPS VERSION 1
Under cgroups v1, each controller may be mounted against a separate cgroup filesystem that provides its own hierarchical organization of the processes on the system. It is also possible to comount multiple (or even all) cgroups v1 controllers against the same cgroup filesystem, meaning that the comounted controllers manage the same hierarchical organization of processes.

For each mounted hierarchy, the directory tree mirrors the control group hierarchy. Each control group is represented by a directory, with each of its child control cgroups represented as a child directory. For instance, /user/joe/1.session represents control group 1.session, which is a child of cgroup joe, which is a child of /user. Under each cgroup directory is a set of files which can be read or written to, reflecting resource limits and a few general cgroup properties.

### Tasks (threads) versus processes
In cgroups v1, a distinction is drawn between processes and tasks. In this view, a process can consist of multiple tasks (more commonly called threads, from a user-space perspective, and called such in the remainder of this man page). In cgroups v1, it is possible to independently manipulate the cgroup memberships of the threads in a process.

The cgroups v1 ability to split threads across different cgroups caused problems in some cases. For example, it made no sense for the memory controller, since all of the threads of a process share a single address space. Because of these problems, the ability to independently manipulate the cgroup memberships of the threads in a process was removed in the initial cgroups v2 implementation, and subsequently restored in a more limited form (see the discussion of "thread mode" below).

### Mounting v1 controllers
The use of cgroups requires a kernel built with the CONFIG_CGROUP option. In addition, each of the v1 controllers has an associated configuration option that must be set in order to employ that controller.

In order to use a v1 controller, it must be mounted against a cgroup filesystem. The usual place for such mounts is under a tmpfs(5) filesystem mounted at /sys/fs/cgroup. Thus, one might mount the cpu controller as follows:

```
mount -t cgroup -o cpu none /sys/fs/cgroup/cpu
```

It is possible to comount multiple controllers against the same hierarchy. For example, here the cpu and cpuacct controllers are comounted against a single hierarchy:

```
mount -t cgroup -o cpu,cpuacct none /sys/fs/cgroup/cpu,cpuacct
```

Comounting controllers has the effect that a process is in the same cgroup for all of the comounted controllers. Separately mounting controllers allows a process to be in cgroup /foo1 for one controller while being in /foo2/foo3 for another.

It is possible to comount all v1 controllers against the same hierarchy:

```
mount -t cgroup -o all cgroup /sys/fs/cgroup
```

(One can achieve the same result by omitting -o all, since it is the default if no controllers are explicitly specified.)

It is not possible to mount the same controller against multiple cgroup hierarchies. For example, it is not possible to mount both the cpu and cpuacct controllers against one hierarchy, and to mount the cpu controller alone against another hierarchy. It is possible to create multiple mount with exactly the same set of comounted controllers. However, in this case all that results is multiple mount points providing a view of the same hierarchy.

Note that on many systems, the v1 controllers are automatically mounted under /sys/fs/cgroup; in particular, systemd(1) automatically creates such mounts.

### Unmounting v1 controllers
A mounted cgroup filesystem can be unmounted using the umount(8) command, as in the following example:

```
umount /sys/fs/cgroup/pids
```

But note well: a cgroup filesystem is unmounted only if it is not busy, that is, it has no child cgroups. If this is not the case, then the only effect of the umount(8) is to make the mount invisible. Thus, to ensure that the mount is really removed, one must first remove all child cgroups, which in turn can be done only after all member processes have been moved from those cgroups to the root cgroup.

### Cgroups version 1 controllers
Each of the cgroups version 1 controllers is governed by a kernel configuration option (listed below). Additionally, the availability of the cgroups feature is governed by the CONFIG_CGROUPS kernel configuration option.

cpu (since Linux 2.6.24; CONFIG_CGROUP_SCHED)

Cgroups can be guaranteed a minimum number of "CPU shares" when a system is busy. This does not limit a cgroup's CPU usage if the CPUs are not busy. For further information, see Documentation/scheduler/sched-design-CFS.rst (or Documentation/scheduler/sched-design-CFS.txt in Linux 5.2 and earlier).

In Linux 3.2, this controller was extended to provide CPU "bandwidth" control. If the kernel is configured with CONFIG_CFS_BANDWIDTH, then within each scheduling period (defined via a file in the cgroup directory), it is possible to define an upper limit on the CPU time allocated to the processes in a cgroup. This upper limit applies even if there is no other competition for the CPU. Further information can be found in the kernel source file Documentation/scheduler/sched-bwc.rst (or Documentation/scheduler/sched-bwc.txt in Linux 5.2 and earlier).

cpuacct (since Linux 2.6.24; CONFIG_CGROUP_CPUACCT)

This provides accounting for CPU usage by groups of processes.

Further information can be found in the kernel source file Documentation/admin-guide/cgroup-v1/cpuacct.rst (or Documentation/cgroup-v1/cpuacct.txt in Linux 5.2 and earlier).

cpuset (since Linux 2.6.24; CONFIG_CPUSETS)

This cgroup can be used to bind the processes in a cgroup to a specified set of CPUs and NUMA nodes.

Further information can be found in the kernel source file Documentation/admin-guide/cgroup-v1/cpusets.rst (or Documentation/cgroup-v1/cpusets.txt in Linux 5.2 and earlier).

memory (since Linux 2.6.25; CONFIG_MEMCG)

The memory controller supports reporting and limiting of process memory, kernel memory, and swap used by cgroups.

Further information can be found in the kernel source file Documentation/admin-guide/cgroup-v1/memory.rst (or Documentation/cgroup-v1/memory.txt in Linux 5.2 and earlier).

devices (since Linux 2.6.26; CONFIG_CGROUP_DEVICE)

This supports controlling which processes may create (mknod) devices as well as open them for reading or writing. The policies may be specified as allow-lists and deny-lists. Hierarchy is enforced, so new rules must not violate existing rules for the target or ancestor cgroups.

Further information can be found in the kernel source file Documentation/admin-guide/cgroup-v1/devices.rst (or Documentation/cgroup-v1/devices.txt in Linux 5.2 and earlier).

freezer (since Linux 2.6.28; CONFIG_CGROUP_FREEZER)

The freezer cgroup can suspend and restore (resume) all processes in a cgroup. Freezing a cgroup /A also causes its children, for example, processes in /A/B, to be frozen.

Further information can be found in the kernel source file Documentation/admin-guide/cgroup-v1/freezer-subsystem.rst (or Documentation/cgroup-v1/freezer-subsystem.txt in Linux 5.2 and earlier).

net_cls (since Linux 2.6.29; CONFIG_CGROUP_NET_CLASSID)

This places a classid, specified for the cgroup, on network packets created by a cgroup. These classids can then be used in firewall rules, as well as used to shape traffic using tc(8). This applies only to packets leaving the cgroup, not to traffic arriving at the cgroup.

Further information can be found in the kernel source file Documentation/admin-guide/cgroup-v1/net_cls.rst (or Documentation/cgroup-v1/net_cls.txt in Linux 5.2 and earlier).

blkio (since Linux 2.6.33; CONFIG_BLK_CGROUP)

The blkio cgroup controls and limits access to specified block devices by applying IO control in the form of throttling and upper limits against leaf nodes and intermediate nodes in the storage hierarchy.

Two policies are available. The first is a proportional-weight time-based division of disk implemented with CFQ. This is in effect for leaf nodes using CFQ. The second is a throttling policy which specifies upper I/O rate limits on a device.

Further information can be found in the kernel source file Documentation/admin-guide/cgroup-v1/blkio-controller.rst (or Documentation/cgroup-v1/blkio-controller.txt in Linux 5.2 and earlier).

perf_event (since Linux 2.6.39; CONFIG_CGROUP_PERF)

This controller allows perf monitoring of the set of processes grouped in a cgroup.

Further information can be found in the kernel source files

net_prio (since Linux 3.3; CONFIG_CGROUP_NET_PRIO)

This allows priorities to be specified, per network interface, for cgroups.

Further information can be found in the kernel source file Documentation/admin-guide/cgroup-v1/net_prio.rst (or Documentation/cgroup-v1/net_prio.txt in Linux 5.2 and earlier).

hugetlb (since Linux 3.5; CONFIG_CGROUP_HUGETLB)

This supports limiting the use of huge pages by cgroups.

Further information can be found in the kernel source file Documentation/admin-guide/cgroup-v1/hugetlb.rst (or Documentation/cgroup-v1/hugetlb.txt in Linux 5.2 and earlier).

pids (since Linux 4.3; CONFIG_CGROUP_PIDS)

This controller permits limiting the number of process that may be created in a cgroup (and its descendants).

Further information can be found in the kernel source file Documentation/admin-guide/cgroup-v1/pids.rst (or Documentation/cgroup-v1/pids.txt in Linux 5.2 and earlier).

rdma (since Linux 4.11; CONFIG_CGROUP_RDMA)

The RDMA controller permits limiting the use of RDMA/IB-specific resources per cgroup.

Further information can be found in the kernel source file Documentation/admin-guide/cgroup-v1/rdma.rst (or Documentation/cgroup-v1/rdma.txt in Linux 5.2 and earlier).

### Creating cgroups and moving processes
A cgroup filesystem initially contains a single root cgroup, '/', which all processes belong to. A new cgroup is created by creating a directory in the cgroup filesystem:

```
mkdir /sys/fs/cgroup/cpu/cg1
```

This creates a new empty cgroup.

A process may be moved to this cgroup by writing its PID into the cgroup's cgroup.procs file:

```
echo $$ > /sys/fs/cgroup/cpu/cg1/cgroup.procs
```

Only one PID at a time should be written to this file.

Writing the value 0 to a cgroup.procs file causes the writing process to be moved to the corresponding cgroup.

When writing a PID into the cgroup.procs, all threads in the process are moved into the new cgroup at once.

Within a hierarchy, a process can be a member of exactly one cgroup. Writing a process's PID to a cgroup.procs file automatically removes it from the cgroup of which it was previously a member.

The cgroup.procs file can be read to obtain a list of the processes that are members of a cgroup. The returned list of PIDs is not guaranteed to be in order. Nor is it guaranteed to be free of duplicates. (For example, a PID may be recycled while reading from the list.)

In cgroups v1, an individual thread can be moved to another cgroup by writing its thread ID (i.e., the kernel thread ID returned by clone(2) and gettid(2)) to the tasks file in a cgroup directory. This file can be read to discover the set of threads that are members of the cgroup.

### Removing cgroups
To remove a cgroup, it must first have no child cgroups and contain no (nonzombie) processes. So long as that is the case, one can simply remove the corresponding directory pathname. Note that files in a cgroup directory cannot and need not be removed.

### Cgroups v1 release notification
Two files can be used to determine whether the kernel provides notifications when a cgroup becomes empty. A cgroup is considered to be empty when it contains no child cgroups and no member processes.

A special file in the root directory of each cgroup hierarchy, release_agent, can be used to register the pathname of a program that may be invoked when a cgroup in the hierarchy becomes empty. The pathname of the newly empty cgroup (relative to the cgroup mount point) is provided as the sole command-line argument when the release_agent program is invoked. The release_agent program might remove the cgroup directory, or perhaps repopulate it with a process.

The default value of the release_agent file is empty, meaning that no release agent is invoked.

The content of the release_agent file can also be specified via a mount option when the cgroup filesystem is mounted:

```
mount -o release_agent=pathname ...
```

Whether or not the release_agent program is invoked when a particular cgroup becomes empty is determined by the value in the notify_on_release file in the corresponding cgroup directory. If this file contains the value 0, then the release_agent program is not invoked. If it contains the value 1, the release_agent program is invoked. The default value for this file in the root cgroup is 0. At the time when a new cgroup is created, the value in this file is inherited from the corresponding file in the parent cgroup.

### Cgroup v1 named hierarchies
In cgroups v1, it is possible to mount a cgroup hierarchy that has no attached controllers:

```
mount -t cgroup -o none,name=somename none /some/mount/point
```

Multiple instances of such hierarchies can be mounted; each hierarchy must have a unique name. The only purpose of such hierarchies is to track processes. (See the discussion of release notification below.) An example of this is the name=systemd cgroup hierarchy that is used by systemd(1) to track services and user sessions.

Since Linux 5.0, the cgroup_no_v1 kernel boot option (described below) can be used to disable cgroup v1 named hierarchies, by specifying cgroup_no_v1=named.

## CGROUPS VERSION 2
In cgroups v2, all mounted controllers reside in a single unified hierarchy. While (different) controllers may be simultaneously mounted under the v1 and v2 hierarchies, it is not possible to mount the same controller simultaneously under both the v1 and the v2 hierarchies.

The new behaviors in cgroups v2 are summarized here, and in some cases elaborated in the following subsections.

•

Cgroups v2 provides a unified hierarchy against which all controllers are mounted.

•

"Internal" processes are not permitted. With the exception of the root cgroup, processes may reside only in leaf nodes (cgroups that do not themselves contain child cgroups). The details are somewhat more subtle than this, and are described below.

•

Active cgroups must be specified via the files cgroup.controllers and cgroup.subtree_control.

•

The tasks file has been removed. In addition, the cgroup.clone_children file that is employed by the cpuset controller has been removed.

•

An improved mechanism for notification of empty cgroups is provided by the cgroup.events file.

For more changes, see the Documentation/admin-guide/cgroup-v2.rst file in the kernel source (or Documentation/cgroup-v2.txt in Linux 4.17 and earlier).

Some of the new behaviors listed above saw subsequent modification with the addition in Linux 4.14 of "thread mode" (described below).

### Cgroups v2 unified hierarchy
In cgroups v1, the ability to mount different controllers against different hierarchies was intended to allow great flexibility for application design. In practice, though, the flexibility turned out to be less useful than expected, and in many cases added complexity. Therefore, in cgroups v2, all available controllers are mounted against a single hierarchy. The available controllers are automatically mounted, meaning that it is not necessary (or possible) to specify the controllers when mounting the cgroup v2 filesystem using a command such as the following:

```
mount -t cgroup2 none /mnt/cgroup2
```

A cgroup v2 controller is available only if it is not currently in use via a mount against a cgroup v1 hierarchy. Or, to put things another way, it is not possible to employ the same controller against both a v1 hierarchy and the unified v2 hierarchy. This means that it may be necessary first to unmount a v1 controller (as described above) before that controller is available in v2. Since systemd(1) makes heavy use of some v1 controllers by default, it can in some cases be simpler to boot the system with selected v1 controllers disabled. To do this, specify the cgroup_no_v1=list option on the kernel boot command line; list is a comma-separated list of the names of the controllers to disable, or the word all to disable all v1 controllers. (This situation is correctly handled by systemd(1), which falls back to operating without the specified controllers.)

Note that on many modern systems, systemd(1) automatically mounts the cgroup2 filesystem at /sys/fs/cgroup/unified during the boot process.

### Cgroups v2 mount options
The following options (mount -o) can be specified when mounting the group v2 filesystem:

nsdelegate (since Linux 4.15)

Treat cgroup namespaces as delegation boundaries. For details, see below.

memory_localevents (since Linux 5.2)

The memory.events should show statistics only for the cgroup itself, and not for any descendant cgroups. This was the behavior before Linux 5.2. Starting in Linux 5.2, the default behavior is to include statistics for descendant cgroups in memory.events, and this mount option can be used to revert to the legacy behavior. This option is system wide and can be set on mount or modified through remount only from the initial mount namespace; it is silently ignored in noninitial namespaces.

### Cgroups v2 controllers
The following controllers, documented in the kernel source file Documentation/admin-guide/cgroup-v2.rst (or Documentation/cgroup-v2.txt in Linux 4.17 and earlier), are supported in cgroups version 2:

cpu (since Linux 4.15)

This is the successor to the version 1 cpu and cpuacct controllers.

cpuset (since Linux 5.0)

This is the successor of the version 1 cpuset controller.

freezer (since Linux 5.2)

This is the successor of the version 1 freezer controller.

hugetlb (since Linux 5.6)

This is the successor of the version 1 hugetlb controller.

io (since Linux 4.5)

This is the successor of the version 1 blkio controller.

memory (since Linux 4.5)

This is the successor of the version 1 memory controller.

perf_event (since Linux 4.11)

This is the same as the version 1 perf_event controller.

pids (since Linux 4.5)

This is the same as the version 1 pids controller.

rdma (since Linux 4.11)

This is the same as the version 1 rdma controller.

There is no direct equivalent of the net_cls and net_prio controllers from cgroups version 1. Instead, support has been added to iptables(8) to allow eBPF filters that hook on cgroup v2 pathnames to make decisions about network traffic on a per-cgroup basis.

The v2 devices controller provides no interface files; instead, device control is gated by attaching an eBPF (BPF_CGROUP_DEVICE) program to a v2 cgroup.

### Cgroups v2 subtree control
Each cgroup in the v2 hierarchy contains the following two files:

cgroup.controllers

This read-only file exposes a list of the controllers that are available in this cgroup. The contents of this file match the contents of the cgroup.subtree_control file in the parent cgroup.

cgroup.subtree_control

This is a list of controllers that are active (enabled) in the cgroup. The set of controllers in this file is a subset of the set in the cgroup.controllers of this cgroup. The set of active controllers is modified by writing strings to this file containing space-delimited controller names, each preceded by '+' (to enable a controller) or '-' (to disable a controller), as in the following example:

```
echo '+pids -memory' > x/y/cgroup.subtree_control

```

An attempt to enable a controller that is not present in cgroup.controllers leads to an ENOENT error when writing to the cgroup.subtree_control file.

Because the list of controllers in cgroup.subtree_control is a subset of those cgroup.controllers, a controller that has been disabled in one cgroup in the hierarchy can never be re-enabled in the subtree below that cgroup.

A cgroup's cgroup.subtree_control file determines the set of controllers that are exercised in the child cgroups. When a controller (e.g., pids) is present in the cgroup.subtree_control file of a parent cgroup, then the corresponding controller-interface files (e.g., pids.max) are automatically created in the children of that cgroup and can be used to exert resource control in the child cgroups.

### Cgroups v2 "no internal processes" rule
Cgroups v2 enforces a so-called "no internal processes" rule. Roughly speaking, this rule means that, with the exception of the root cgroup, processes may reside only in leaf nodes (cgroups that do not themselves contain child cgroups). This avoids the need to decide how to partition resources between processes which are members of cgroup A and processes in child cgroups of A.

For instance, if cgroup /cg1/cg2 exists, then a process may reside in /cg1/cg2, but not in /cg1. This is to avoid an ambiguity in cgroups v1 with respect to the delegation of resources between processes in /cg1 and its child cgroups. The recommended approach in cgroups v2 is to create a subdirectory called leaf for any nonleaf cgroup which should contain processes, but no child cgroups. Thus, processes which previously would have gone into /cg1 would now go into /cg1/leaf. This has the advantage of making explicit the relationship between processes in /cg1/leaf and /cg1's other children.

The "no internal processes" rule is in fact more subtle than stated above. More precisely, the rule is that a (nonroot) cgroup can't both (1) have member processes, and (2) distribute resources into child cgroups—that is, have a nonempty cgroup.subtree_control file. Thus, it is possible for a cgroup to have both member processes and child cgroups, but before controllers can be enabled for that cgroup, the member processes must be moved out of the cgroup (e.g., perhaps into the child cgroups).

With the Linux 4.14 addition of "thread mode" (described below), the "no internal processes" rule has been relaxed in some cases.

### Cgroups v2 cgroup.events file
Each nonroot cgroup in the v2 hierarchy contains a read-only file, cgroup.events, whose contents are key-value pairs (delimited by newline characters, with the key and value separated by spaces) providing state information about the cgroup:

```
$ cat mygrp/cgroup.events
populated 1
frozen 0
```

The following keys may appear in this file:

populated

The value of this key is either 1, if this cgroup or any of its descendants has member processes, or otherwise 0.

frozen (since Linux 5.2)

The value of this key is 1 if this cgroup is currently frozen, or 0 if it is not.

The cgroup.events file can be monitored, in order to receive notification when the value of one of its keys changes. Such monitoring can be done using inotify(7), which notifies changes as IN_MODIFY events, or poll(2), which notifies changes by returning the POLLPRI and POLLERR bits in the revents field.

### Cgroup v2 release notification
Cgroups v2 provides a new mechanism for obtaining notification when a cgroup becomes empty. The cgroups v1 release_agent and notify_on_release files are removed, and replaced by the populated key in the cgroup.events file. This key either has the value 0, meaning that the cgroup (and its descendants) contain no (nonzombie) member processes, or 1, meaning that the cgroup (or one of its descendants) contains member processes.

The cgroups v2 release-notification mechanism offers the following advantages over the cgroups v1 release_agent mechanism:

•

It allows for cheaper notification, since a single process can monitor multiple cgroup.events files (using the techniques described earlier). By contrast, the cgroups v1 mechanism requires the expense of creating a process for each notification.

•

Notification for different cgroup subhierarchies can be delegated to different processes. By contrast, the cgroups v1 mechanism allows only one release agent for an entire hierarchy.

### Cgroups v2 cgroup.stat file
Each cgroup in the v2 hierarchy contains a read-only cgroup.stat file (first introduced in Linux 4.14) that consists of lines containing key-value pairs. The following keys currently appear in this file:

nr_descendants

This is the total number of visible (i.e., living) descendant cgroups underneath this cgroup.

nr_dying_descendants

This is the total number of dying descendant cgroups underneath this cgroup. A cgroup enters the dying state after being deleted. It remains in that state for an undefined period (which will depend on system load) while resources are freed before the cgroup is destroyed. Note that the presence of some cgroups in the dying state is normal, and is not indicative of any problem.

A process can't be made a member of a dying cgroup, and a dying cgroup can't be brought back to life.

### Limiting the number of descendant cgroups
Each cgroup in the v2 hierarchy contains the following files, which can be used to view and set limits on the number of descendant cgroups under that cgroup:

cgroup.max.depth (since Linux 4.14)

This file defines a limit on the depth of nesting of descendant cgroups. A value of 0 in this file means that no descendant cgroups can be created. An attempt to create a descendant whose nesting level exceeds the limit fails (mkdir(2) fails with the error EAGAIN).

Writing the string "max" to this file means that no limit is imposed. The default value in this file is "max" .

cgroup.max.descendants (since Linux 4.14)

This file defines a limit on the number of live descendant cgroups that this cgroup may have. An attempt to create more descendants than allowed by the limit fails (mkdir(2) fails with the error EAGAIN).

Writing the string "max" to this file means that no limit is imposed. The default value in this file is "max".

## CGROUPS DELEGATION: DELEGATING A HIERARCHY TO A LESS PRIVILEGED USER
In the context of cgroups, delegation means passing management of some subtree of the cgroup hierarchy to a nonprivileged user. Cgroups v1 provides support for delegation based on file permissions in the cgroup hierarchy but with less strict containment rules than v2 (as noted below). Cgroups v2 supports delegation with containment by explicit design. The focus of the discussion in this section is on delegation in cgroups v2, with some differences for cgroups v1 noted along the way.

Some terminology is required in order to describe delegation. A delegater is a privileged user (i.e., root) who owns a parent cgroup. A delegatee is a nonprivileged user who will be granted the permissions needed to manage some subhierarchy under that parent cgroup, known as the delegated subtree.

To perform delegation, the delegater makes certain directories and files writable by the delegatee, typically by changing the ownership of the objects to be the user ID of the delegatee. Assuming that we want to delegate the hierarchy rooted at (say) /dlgt_grp and that there are not yet any child cgroups under that cgroup, the ownership of the following is changed to the user ID of the delegatee:

/dlgt_grp

Changing the ownership of the root of the subtree means that any new cgroups created under the subtree (and the files they contain) will also be owned by the delegatee.

/dlgt_grp/cgroup.procs

Changing the ownership of this file means that the delegatee can move processes into the root of the delegated subtree.

/dlgt_grp/cgroup.subtree_control (cgroups v2 only)

Changing the ownership of this file means that the delegatee can enable controllers (that are present in /dlgt_grp/cgroup.controllers) in order to further redistribute resources at lower levels in the subtree. (As an alternative to changing the ownership of this file, the delegater might instead add selected controllers to this file.)

/dlgt_grp/cgroup.threads (cgroups v2 only)

Changing the ownership of this file is necessary if a threaded subtree is being delegated (see the description of "thread mode", below). This permits the delegatee to write thread IDs to the file. (The ownership of this file can also be changed when delegating a domain subtree, but currently this serves no purpose, since, as described below, it is not possible to move a thread between domain cgroups by writing its thread ID to the cgroup.threads file.)

In cgroups v1, the corresponding file that should instead be delegated is the tasks file.

The delegater should not change the ownership of any of the controller interfaces files (e.g., pids.max, memory.high) in dlgt_grp. Those files are used from the next level above the delegated subtree in order to distribute resources into the subtree, and the delegatee should not have permission to change the resources that are distributed into the delegated subtree.

See also the discussion of the /sys/kernel/cgroup/delegate file in NOTES for information about further delegatable files in cgroups v2.

After the aforementioned steps have been performed, the delegatee can create child cgroups within the delegated subtree (the cgroup subdirectories and the files they contain will be owned by the delegatee) and move processes between cgroups in the subtree. If some controllers are present in dlgt_grp/cgroup.subtree_control, or the ownership of that file was passed to the delegatee, the delegatee can also control the further redistribution of the corresponding resources into the delegated subtree.

### Cgroups v2 delegation: nsdelegate and cgroup namespaces
Starting with Linux 4.13, there is a second way to perform cgroup delegation in the cgroups v2 hierarchy. This is done by mounting or remounting the cgroup v2 filesystem with the nsdelegate mount option. For example, if the cgroup v2 filesystem has already been mounted, we can remount it with the nsdelegate option as follows:

```
mount -t cgroup2 -o remount,nsdelegate \

                 none /sys/fs/cgroup/unified
```

The effect of this mount option is to cause cgroup namespaces to automatically become delegation boundaries. More specifically, the following restrictions apply for processes inside the cgroup namespace:

•

Writes to controller interface files in the root directory of the namespace will fail with the error EPERM. Processes inside the cgroup namespace can still write to delegatable files in the root directory of the cgroup namespace such as cgroup.procs and cgroup.subtree_control, and can create subhierarchy underneath the root directory.

•

Attempts to migrate processes across the namespace boundary are denied (with the error ENOENT). Processes inside the cgroup namespace can still (subject to the containment rules described below) move processes between cgroups within the subhierarchy under the namespace root.

The ability to define cgroup namespaces as delegation boundaries makes cgroup namespaces more useful. To understand why, suppose that we already have one cgroup hierarchy that has been delegated to a nonprivileged user, cecilia, using the older delegation technique described above. Suppose further that cecilia wanted to further delegate a subhierarchy under the existing delegated hierarchy. (For example, the delegated hierarchy might be associated with an unprivileged container run by cecilia.) Even if a cgroup namespace was employed, because both hierarchies are owned by the unprivileged user cecilia, the following illegitimate actions could be performed:

•

A process in the inferior hierarchy could change the resource controller settings in the root directory of that hierarchy. (These resource controller settings are intended to allow control to be exercised from the parent cgroup; a process inside the child cgroup should not be allowed to modify them.)

•

A process inside the inferior hierarchy could move processes into and out of the inferior hierarchy if the cgroups in the superior hierarchy were somehow visible.

Employing the nsdelegate mount option prevents both of these possibilities.

The nsdelegate mount option only has an effect when performed in the initial mount namespace; in other mount namespaces, the option is silently ignored.

Note: On some systems, systemd(1) automatically mounts the cgroup v2 filesystem. In order to experiment with the nsdelegate operation, it may be useful to boot the kernel with the following command-line options:

```
cgroup_no_v1=all systemd.legacy_systemd_cgroup_controller
```

These options cause the kernel to boot with the cgroups v1 controllers disabled (meaning that the controllers are available in the v2 hierarchy), and tells systemd(1) not to mount and use the cgroup v2 hierarchy, so that the v2 hierarchy can be manually mounted with the desired options after boot-up.

### Cgroup delegation containment rules
Some delegation containment rules ensure that the delegatee can move processes between cgroups within the delegated subtree, but can't move processes from outside the delegated subtree into the subtree or vice versa. A nonprivileged process (i.e., the delegatee) can write the PID of a "target" process into a cgroup.procs file only if all of the following are true:

•

The writer has write permission on the cgroup.procs file in the destination cgroup.

•

The writer has write permission on the cgroup.procs file in the nearest common ancestor of the source and destination cgroups. Note that in some cases, the nearest common ancestor may be the source or destination cgroup itself. This requirement is not enforced for cgroups v1 hierarchies, with the consequence that containment in v1 is less strict than in v2. (For example, in cgroups v1 the user that owns two distinct delegated subhierarchies can move a process between the hierarchies.)

•

If the cgroup v2 filesystem was mounted with the nsdelegate option, the writer must be able to see the source and destination cgroups from its cgroup namespace.

•

In cgroups v1: the effective UID of the writer (i.e., the delegatee) matches the real user ID or the saved set-user-ID of the target process. Before Linux 4.11, this requirement also applied in cgroups v2 (This was a historical requirement inherited from cgroups v1 that was later deemed unnecessary, since the other rules suffice for containment in cgroups v2.)

Note: one consequence of these delegation containment rules is that the unprivileged delegatee can't place the first process into the delegated subtree; instead, the delegater must place the first process (a process owned by the delegatee) into the delegated subtree.

## CGROUPS VERSION 2 THREAD MODE
Among the restrictions imposed by cgroups v2 that were not present in cgroups v1 are the following:

•

No thread-granularity control: all of the threads of a process must be in the same cgroup.

•

No internal processes: a cgroup can't both have member processes and exercise controllers on child cgroups.

Both of these restrictions were added because the lack of these restrictions had caused problems in cgroups v1. In particular, the cgroups v1 ability to allow thread-level granularity for cgroup membership made no sense for some controllers. (A notable example was the memory controller: since threads share an address space, it made no sense to split threads across different memory cgroups.)

Notwithstanding the initial design decision in cgroups v2, there were use cases for certain controllers, notably the cpu controller, for which thread-level granularity of control was meaningful and useful. To accommodate such use cases, Linux 4.14 added thread mode for cgroups v2.

Thread mode allows the following:

•

The creation of threaded subtrees in which the threads of a process may be spread across cgroups inside the tree. (A threaded subtree may contain multiple multithreaded processes.)

•

The concept of threaded controllers, which can distribute resources across the cgroups in a threaded subtree.

•

A relaxation of the "no internal processes rule", so that, within a threaded subtree, a cgroup can both contain member threads and exercise resource control over child cgroups.

With the addition of thread mode, each nonroot cgroup now contains a new file, cgroup.type, that exposes, and in some circumstances can be used to change, the "type" of a cgroup. This file contains one of the following type values:

domain

This is a normal v2 cgroup that provides process-granularity control. If a process is a member of this cgroup, then all threads of the process are (by definition) in the same cgroup. This is the default cgroup type, and provides the same behavior that was provided for cgroups in the initial cgroups v2 implementation.

threaded

This cgroup is a member of a threaded subtree. Threads can be added to this cgroup, and controllers can be enabled for the cgroup.

domain threaded

This is a domain cgroup that serves as the root of a threaded subtree. This cgroup type is also known as "threaded root".

domain invalid

This is a cgroup inside a threaded subtree that is in an "invalid" state. Processes can't be added to the cgroup, and controllers can't be enabled for the cgroup. The only thing that can be done with this cgroup (other than deleting it) is to convert it to a threaded cgroup by writing the string "threaded" to the cgroup.type file.

The rationale for the existence of this "interim" type during the creation of a threaded subtree (rather than the kernel simply immediately converting all cgroups under the threaded root to the type threaded) is to allow for possible future extensions to the thread mode model

### Threaded versus domain controllers
With the addition of threads mode, cgroups v2 now distinguishes two types of resource controllers:

•

Threaded controllers: these controllers support thread-granularity for resource control and can be enabled inside threaded subtrees, with the result that the corresponding controller-interface files appear inside the cgroups in the threaded subtree. As at Linux 4.19, the following controllers are threaded: cpu, perf_event, and pids.

•

Domain controllers: these controllers support only process granularity for resource control. From the perspective of a domain controller, all threads of a process are always in the same cgroup. Domain controllers can't be enabled inside a threaded subtree.

### Creating a threaded subtree
There are two pathways that lead to the creation of a threaded subtree. The first pathway proceeds as follows:

(1)

We write the string "threaded" to the cgroup.type file of a cgroup y/z that currently has the type domain. This has the following effects:

•

The type of the cgroup y/z becomes threaded.

•

The type of the parent cgroup, y, becomes domain threaded. The parent cgroup is the root of a threaded subtree (also known as the "threaded root").

•

All other cgroups under y that were not already of type threaded (because they were inside already existing threaded subtrees under the new threaded root) are converted to type domain invalid. Any subsequently created cgroups under y will also have the type domain invalid.

(2)

We write the string "threaded" to each of the domain invalid cgroups under y, in order to convert them to the type threaded. As a consequence of this step, all threads under the threaded root now have the type threaded and the threaded subtree is now fully usable. The requirement to write "threaded" to each of these cgroups is somewhat cumbersome, but allows for possible future extensions to the thread-mode model.

The second way of creating a threaded subtree is as follows:

(1)

In an existing cgroup, z, that currently has the type domain, we (1.1) enable one or more threaded controllers and (1.2) make a process a member of z. (These two steps can be done in either order.) This has the following consequences:

•

The type of z becomes domain threaded.

•

All of the descendant cgroups of x that were not already of type threaded are converted to type domain invalid.

(2)

As before, we make the threaded subtree usable by writing the string "threaded" to each of the domain invalid cgroups under y, in order to convert them to the type threaded.

One of the consequences of the above pathways to creating a threaded subtree is that the threaded root cgroup can be a parent only to threaded (and domain invalid) cgroups. The threaded root cgroup can't be a parent of a domain cgroups, and a threaded cgroup can't have a sibling that is a domain cgroup.

### Using a threaded subtree
Within a threaded subtree, threaded controllers can be enabled in each subgroup whose type has been changed to threaded; upon doing so, the corresponding controller interface files appear in the children of that cgroup.

A process can be moved into a threaded subtree by writing its PID to the cgroup.procs file in one of the cgroups inside the tree. This has the effect of making all of the threads in the process members of the corresponding cgroup and makes the process a member of the threaded subtree. The threads of the process can then be spread across the threaded subtree by writing their thread IDs (see gettid(2)) to the cgroup.threads files in different cgroups inside the subtree. The threads of a process must all reside in the same threaded subtree.

As with writing to cgroup.procs, some containment rules apply when writing to the cgroup.threads file:

•

The writer must have write permission on the cgroup.threads file in the destination cgroup.

•

The writer must have write permission on the cgroup.procs file in the common ancestor of the source and destination cgroups. (In some cases, the common ancestor may be the source or destination cgroup itself.)

•

The source and destination cgroups must be in the same threaded subtree. (Outside a threaded subtree, an attempt to move a thread by writing its thread ID to the cgroup.threads file in a different domain cgroup fails with the error EOPNOTSUPP.)

The cgroup.threads file is present in each cgroup (including domain cgroups) and can be read in order to discover the set of threads that is present in the cgroup. The set of thread IDs obtained when reading this file is not guaranteed to be ordered or free of duplicates.

The cgroup.procs file in the threaded root shows the PIDs of all processes that are members of the threaded subtree. The cgroup.procs files in the other cgroups in the subtree are not readable.

Domain controllers can't be enabled in a threaded subtree; no controller-interface files appear inside the cgroups underneath the threaded root. From the point of view of a domain controller, threaded subtrees are invisible: a multithreaded process inside a threaded subtree appears to a domain controller as a process that resides in the threaded root cgroup.

Within a threaded subtree, the "no internal processes" rule does not apply: a cgroup can both contain member processes (or thread) and exercise controllers on child cgroups.

### Rules for writing to cgroup.type and creating threaded subtrees
A number of rules apply when writing to the cgroup.type file:

•

Only the string "threaded" may be written. In other words, the only explicit transition that is possible is to convert a domain cgroup to type threaded.

•

The effect of writing "threaded" depends on the current value in cgroup.type, as follows:

•

domain or domain threaded: start the creation of a threaded subtree (whose root is the parent of this cgroup) via the first of the pathways described above;

•

domain invalid: convert this cgroup (which is inside a threaded subtree) to a usable (i.e., threaded) state;

•

threaded: no effect (a "no-op").

•

We can't write to a cgroup.type file if the parent's type is domain invalid. In other words, the cgroups of a threaded subtree must be converted to the threaded state in a top-down manner.

There are also some constraints that must be satisfied in order to create a threaded subtree rooted at the cgroup x:

•

There can be no member processes in the descendant cgroups of x. (The cgroup x can itself have member processes.)

•

No domain controllers may be enabled in x's cgroup.subtree_control file.

If any of the above constraints is violated, then an attempt to write "threaded" to a cgroup.type file fails with the error ENOTSUP.

### The "domain threaded" cgroup type
According to the pathways described above, the type of a cgroup can change to domain threaded in either of the following cases:

•

The string "threaded" is written to a child cgroup.

•

A threaded controller is enabled inside the cgroup and a process is made a member of the cgroup.

A domain threaded cgroup, x, can revert to the type domain if the above conditions no longer hold true—that is, if all threaded child cgroups of x are removed and either x no longer has threaded controllers enabled or no longer has member processes.

When a domain threaded cgroup x reverts to the type domain:

•

All domain invalid descendants of x that are not in lower-level threaded subtrees revert to the type domain.

•

The root cgroups in any lower-level threaded subtrees revert to the type domain threaded.

### Exceptions for the root cgroup
The root cgroup of the v2 hierarchy is treated exceptionally: it can be the parent of both domain and threaded cgroups. If the string "threaded" is written to the cgroup.type file of one of the children of the root cgroup, then

•

The type of that cgroup becomes threaded.

•

The type of any descendants of that cgroup that are not part of lower-level threaded subtrees changes to domain invalid.

Note that in this case, there is no cgroup whose type becomes domain threaded. (Notionally, the root cgroup can be considered as the threaded root for the cgroup whose type was changed to threaded.)

The aim of this exceptional treatment for the root cgroup is to allow a threaded cgroup that employs the cpu controller to be placed as high as possible in the hierarchy, so as to minimize the (small) cost of traversing the cgroup hierarchy.

### The cgroups v2 "cpu" controller and realtime threads
As at Linux 4.19, the cgroups v2 cpu controller does not support control of realtime threads (specifically threads scheduled under any of the policies SCHED_FIFO, SCHED_RR, described SCHED_DEADLINE; see sched(7)). Therefore, the cpu controller can be enabled in the root cgroup only if all realtime threads are in the root cgroup. (If there are realtime threads in nonroot cgroups, then a write(2) of the string "+cpu" to the cgroup.subtree_control file fails with the error EINVAL.)

On some systems, systemd(1) places certain realtime threads in nonroot cgroups in the v2 hierarchy. On such systems, these threads must first be moved to the root cgroup before the cpu controller can be enabled.

## ERRORS
The following errors can occur for mount(2):

EBUSY

An attempt to mount a cgroup version 1 filesystem specified neither the name= option (to mount a named hierarchy) nor a controller name (or all).

## NOTES
A child process created via fork(2) inherits its parent's cgroup memberships. A process's cgroup memberships are preserved across execve(2).

The clone3(2) CLONE_INTO_CGROUP flag can be used to create a child process that begins its life in a different version 2 cgroup from the parent process.

### /proc files
/proc/cgroups (since Linux 2.6.24)

This file contains information about the controllers that are compiled into the kernel. An example of the contents of this file (reformatted for readability) is the following:

```
#subsys_name    hierarchy      num_cgroups    enabled
cpuset          4              1              1
cpu             8              1              1
cpuacct         8              1              1
blkio           6              1              1
memory          3              1              1
devices         10             84             1
freezer         7              1              1
net_cls         9              1              1
perf_event      5              1              1
net_prio        9              1              1
hugetlb         0              1              0
pids            2              1              1

```

The fields in this file are, from left to right:

[1]

The name of the controller.

[2]

The unique ID of the cgroup hierarchy on which this controller is mounted. If multiple cgroups v1 controllers are bound to the same hierarchy, then each will show the same hierarchy ID in this field. The value in this field will be 0 if:

•

the controller is not mounted on a cgroups v1 hierarchy;

•

the controller is bound to the cgroups v2 single unified hierarchy; or

•

the controller is disabled (see below).

[3]

The number of control groups in this hierarchy using this controller.

[4]

This field contains the value 1 if this controller is enabled, or 0 if it has been disabled (via the cgroup_disable kernel command-line boot parameter).

/proc/pid/cgroup (since Linux 2.6.24)

This file describes control groups to which the process with the corresponding PID belongs. The displayed information differs for cgroups version 1 and version 2 hierarchies.

For each cgroup hierarchy of which the process is a member, there is one entry containing three colon-separated fields:

```
hierarchy-ID:controller-list:cgroup-path

```

For example:

```
5:cpuacct,cpu,cpuset:/daemons

```

The colon-separated fields are, from left to right:

[1]

For cgroups version 1 hierarchies, this field contains a unique hierarchy ID number that can be matched to a hierarchy ID in /proc/cgroups. For the cgroups version 2 hierarchy, this field contains the value 0.

[2]

For cgroups version 1 hierarchies, this field contains a comma-separated list of the controllers bound to the hierarchy. For the cgroups version 2 hierarchy, this field is empty.

[3]

This field contains the pathname of the control group in the hierarchy to which the process belongs. This pathname is relative to the mount point of the hierarchy.

### /sys/kernel/cgroup files
/sys/kernel/cgroup/delegate (since Linux 4.15)

This file exports a list of the cgroups v2 files (one per line) that are delegatable (i.e., whose ownership should be changed to the user ID of the delegatee). In the future, the set of delegatable files may change or grow, and this file provides a way for the kernel to inform user-space applications of which files must be delegated. As at Linux 4.15, one sees the following when inspecting this file:

```
$ cat /sys/kernel/cgroup/delegate
cgroup.procs
cgroup.subtree_control
cgroup.threads

```

/sys/kernel/cgroup/features (since Linux 4.15)

Over time, the set of cgroups v2 features that are provided by the kernel may change or grow, or some features may not be enabled by default. This file provides a way for user-space applications to discover what features the running kernel supports and has enabled. Features are listed one per line:

```
$ cat /sys/kernel/cgroup/features
nsdelegate
memory_localevents

```

The entries that can appear in this file are:

memory_localevents (since Linux 5.2)

The kernel supports the memory_localevents mount option.

nsdelegate (since Linux 4.15)

The kernel supports the nsdelegate mount option.

memory_recursiveprot (since Linux 5.7)

The kernel supports the memory_recursiveprot mount option.

## SEE ALSO
prlimit(1), systemd(1), systemd-cgls(1), systemd-cgtop(1), clone(2), ioprio_set(2), perf_event_open(2), setrlimit(2), cgroup_namespaces(7), cpuset(7), namespaces(7), sched(7), user_namespaces(7)

The kernel source file Documentation/admin-guide/cgroup-v2.rst.


charsets

package: man-pages

title: charsets(7)

text:
# charsets(7)

## NAME
charsets - character set standards and internationalization

## DESCRIPTION
This manual page gives an overview on different character set standards and how they were used on Linux before Unicode became ubiquitous. Some of this information is still helpful for people working with legacy systems and documents.

Standards discussed include such as ASCII, GB 2312, ISO 8859, JIS, KOI8-R, KS, and Unicode.

The primary emphasis is on character sets that were actually used by locale character sets, not the myriad others that could be found in data from other systems.

### ASCII
ASCII (American Standard Code For Information Interchange) is the original 7-bit character set, originally designed for American English. Also known as US-ASCII. It is currently described by the ISO 646:1991 IRV (International Reference Version) standard.

Various ASCII variants replacing the dollar sign with other currency symbols and replacing punctuation with non-English alphabetic characters to cover German, French, Spanish, and others in 7 bits emerged. All are deprecated; glibc does not support locales whose character sets are not true supersets of ASCII.

As Unicode, when using UTF-8, is ASCII-compatible, plain ASCII text still renders properly on modern UTF-8 using systems.

### ISO 8859
ISO 8859 is a series of 15 8-bit character sets, all of which have ASCII in their low (7-bit) half, invisible control characters in positions 128 to 159, and 96 fixed-width graphics in positions 160–255.

Of these, the most important is ISO 8859-1 ("Latin Alphabet No. 1" / Latin-1). It was widely adopted and supported by different systems, and is gradually being replaced with Unicode. The ISO 8859-1 characters are also the first 256 characters of Unicode.

Console support for the other 8859 character sets is available under Linux through user-mode utilities (such as setfont(8)) that modify keyboard bindings and the EGA graphics table and employ the "user mapping" font table in the console driver.

Here are brief descriptions of each character set:

8859-1 (Latin-1)

Latin-1 covers many European languages such as Albanian, Basque, Danish, English, Faroese, Galician, Icelandic, Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish. The lack of the ligatures Dutch Ĳ/ĳ, French œ, and „German“ quotation marks was considered tolerable.

8859-2 (Latin-2)

Latin-2 supports many Latin-written Central and East European languages such as Bosnian, Croatian, Czech, German, Hungarian, Polish, Slovak, and Slovene. Replacing Romanian ș/ț with ş/ţ was considered tolerable.

8859-3 (Latin-3)

Latin-3 was designed to cover of Esperanto, Maltese, and Turkish, but 8859-9 later superseded it for Turkish.

8859-4 (Latin-4)

Latin-4 introduced letters for North European languages such as Estonian, Latvian, and Lithuanian, but was superseded by 8859-10 and 8859-13.

8859-5

Cyrillic letters supporting Bulgarian, Byelorussian, Macedonian, Russian, Serbian, and (almost completely) Ukrainian. It was never widely used, see the discussion of KOI8-R/KOI8-U below.

8859-6

Was created for Arabic. The 8859-6 glyph table is a fixed font of separate letter forms, but a proper display engine should combine these using the proper initial, medial, and final forms.

8859-7

Was created for Modern Greek in 1987, updated in 2003.

8859-8

Supports Modern Hebrew without niqud (punctuation signs). Niqud and full-fledged Biblical Hebrew were outside the scope of this character set.

8859-9 (Latin-5)

This is a variant of Latin-1 that replaces Icelandic letters with Turkish ones.

8859-10 (Latin-6)

Latin-6 added the Inuit (Greenlandic) and Sami (Lappish) letters that were missing in Latin-4 to cover the entire Nordic area.

8859-11

Supports the Thai alphabet and is nearly identical to the TIS-620 standard.

8859-12

This character set does not exist.

8859-13 (Latin-7)

Supports the Baltic Rim languages; in particular, it includes Latvian characters not found in Latin-4.

8859-14 (Latin-8)

This is the Celtic character set, covering Old Irish, Manx, Gaelic, Welsh, Cornish, and Breton.

8859-15 (Latin-9)

Latin-9 is similar to the widely used Latin-1 but replaces some less common symbols with the Euro sign and French and Finnish letters that were missing in Latin-1.

8859-16 (Latin-10)

This character set covers many Southeast European languages, and most importantly supports Romanian more completely than Latin-2.

### KOI8-R / KOI8-U
KOI8-R is a non-ISO character set popular in Russia before Unicode. The lower half is ASCII; the upper is a Cyrillic character set somewhat better designed than ISO 8859-5. KOI8-U, based on KOI8-R, has better support for Ukrainian. Neither of these sets are ISO-2022 compatible, unlike the ISO 8859 series.

Console support for KOI8-R is available under Linux through user-mode utilities that modify keyboard bindings and the EGA graphics table, and employ the "user mapping" font table in the console driver.

### GB 2312
GB 2312 is a mainland Chinese national standard character set used to express simplified Chinese. Just like JIS X 0208, characters are mapped into a 94x94 two-byte matrix used to construct EUC-CN. EUC-CN is the most important encoding for Linux and includes ASCII and GB 2312. Note that EUC-CN is often called as GB, GB 2312, or CN-GB.

### Big5
Big5 was a popular character set in Taiwan to express traditional Chinese. (Big5 is both a character set and an encoding.) It is a superset of ASCII. Non-ASCII characters are expressed in two bytes. Bytes 0xa1–0xfe are used as leading bytes for two-byte characters. Big5 and its extension were widely used in Taiwan and Hong Kong. It is not ISO 2022 compliant.

### JIS X 0208
JIS X 0208 is a Japanese national standard character set. Though there are some more Japanese national standard character sets (like JIS X 0201, JIS X 0212, and JIS X 0213), this is the most important one. Characters are mapped into a 94x94 two-byte matrix, whose each byte is in the range 0x21–0x7e. Note that JIS X 0208 is a character set, not an encoding. This means that JIS X 0208 itself is not used for expressing text data. JIS X 0208 is used as a component to construct encodings such as EUC-JP, Shift_JIS, and ISO-2022-JP. EUC-JP is the most important encoding for Linux and includes ASCII and JIS X 0208. In EUC-JP, JIS X 0208 characters are expressed in two bytes, each of which is the JIS X 0208 code plus 0x80.

### KS X 1001
KS X 1001 is a Korean national standard character set. Just as JIS X 0208, characters are mapped into a 94x94 two-byte matrix. KS X 1001 is used like JIS X 0208, as a component to construct encodings such as EUC-KR, Johab, and ISO-2022-KR. EUC-KR is the most important encoding for Linux and includes ASCII and KS X 1001. KS C 5601 is an older name for KS X 1001.

### ISO 2022 and ISO 4873
The ISO 2022 and 4873 standards describe a font-control model based on VT100 practice. This model is (partially) supported by the Linux kernel and by xterm(1). Several ISO 2022-based character encodings have been defined, especially for Japanese.

There are 4 graphic character sets, called G0, G1, G2, and G3, and one of them is the current character set for codes with high bit zero (initially G0), and one of them is the current character set for codes with high bit one (initially G1). Each graphic character set has 94 or 96 characters, and is essentially a 7-bit character set. It uses codes either 040–0177 (041–0176) or 0240–0377 (0241–0376). G0 always has size 94 and uses codes 041–0176.

Switching between character sets is done using the shift functions ^N (SO or LS1), ^O (SI or LS0), ESC n (LS2), ESC o (LS3), ESC N (SS2), ESC O (SS3), ESC ~ (LS1R), ESC } (LS2R), ESC | (LS3R). The function LSn makes character set Gn the current one for codes with high bit zero. The function LSnR makes character set Gn the current one for codes with high bit one. The function SSn makes character set Gn (n=2 or 3) the current one for the next character only (regardless of the value of its high order bit).

A 94-character set is designated as Gn character set by an escape sequence ESC ( xx (for G0), ESC ) xx (for G1), ESC * xx (for G2), ESC + xx (for G3), where xx is a symbol or a pair of symbols found in the ISO 2375 International Register of Coded Character Sets. For example, ESC ( @ selects the ISO 646 character set as G0, ESC ( A selects the UK standard character set (with pound instead of number sign), ESC ( B selects ASCII (with dollar instead of currency sign), ESC ( M selects a character set for African languages, ESC ( ! A selects the Cuban character set, and so on.

A 96-character set is designated as Gn character set by an escape sequence ESC - xx (for G1), ESC . xx (for G2) or ESC / xx (for G3). For example, ESC - G selects the Hebrew alphabet as G1.

A multibyte character set is designated as Gn character set by an escape sequence ESC $ xx or ESC $ ( xx (for G0), ESC $ ) xx (for G1), ESC $ * xx (for G2), ESC $ + xx (for G3). For example, ESC $ ( C selects the Korean character set for G0. The Japanese character set selected by ESC $ B has a more recent version selected by ESC & @ ESC $ B.

ISO 4873 stipulates a narrower use of character sets, where G0 is fixed (always ASCII), so that G1, G2, and G3 can be invoked only for codes with the high order bit set. In particular, ^N and ^O are not used anymore, ESC ( xx can be used only with xx=B, and ESC ) xx, ESC * xx, ESC + xx are equivalent to ESC - xx, ESC . xx, ESC / xx, respectively.

### TIS-620
TIS-620 is a Thai national standard character set and a superset of ASCII. In the same fashion as the ISO 8859 series, Thai characters are mapped into 0xa1–0xfe.

### Unicode
Unicode (ISO/IEC 10646) is a standard which aims to unambiguously represent every character in every human language. Unicode's structure permits 20.1 bits to encode every character. Since most computers don't include 20.1-bit integers, Unicode is usually encoded as 32-bit integers internally and either a series of 16-bit integers (UTF-16) (needing two 16-bit integers only when encoding certain rare characters) or a series of 8-bit bytes (UTF-8).

Linux represents Unicode using the 8-bit Unicode Transformation Format (UTF-8). UTF-8 is a variable length encoding of Unicode. It uses 1 byte to code 7 bits, 2 bytes for 11 bits, 3 bytes for 16 bits, 4 bytes for 21 bits, 5 bytes for 26 bits, 6 bytes for 31 bits.

Let 0,1,x stand for a zero, one, or arbitrary bit. A byte 0xxxxxxx stands for the Unicode 00000000 0xxxxxxx which codes the same symbol as the ASCII 0xxxxxxx. Thus, ASCII goes unchanged into UTF-8, and people using only ASCII do not notice any change: not in code, and not in file size.

A byte 110xxxxx is the start of a 2-byte code, and 110xxxxx 10yyyyyy is assembled into 00000xxx xxyyyyyy. A byte 1110xxxx is the start of a 3-byte code, and 1110xxxx 10yyyyyy 10zzzzzz is assembled into xxxxyyyy yyzzzzzz. (When UTF-8 is used to code the 31-bit ISO/IEC 10646 then this progression continues up to 6-byte codes.)

For most texts in ISO 8859 character sets, this means that the characters outside of ASCII are now coded with two bytes. This tends to expand ordinary text files by only one or two percent. For Russian or Greek texts, this expands ordinary text files by 100%, since text in those languages is mostly outside of ASCII. For Japanese users this means that the 16-bit codes now in common use will take three bytes. While there are algorithmic conversions from some character sets (especially ISO 8859-1) to Unicode, general conversion requires carrying around conversion tables, which can be quite large for 16-bit codes.

Note that UTF-8 is self-synchronizing: 10xxxxxx is a tail, any other byte is the head of a code. Note that the only way ASCII bytes occur in a UTF-8 stream, is as themselves. In particular, there are no embedded NULs ('\0') or '/'s that form part of some larger code.

Since ASCII, and, in particular, NUL and '/', are unchanged, the kernel does not notice that UTF-8 is being used. It does not care at all what the bytes it is handling stand for.

Rendering of Unicode data streams is typically handled through "subfont" tables which map a subset of Unicode to glyphs. Internally the kernel uses Unicode to describe the subfont loaded in video RAM. This means that in the Linux console in UTF-8 mode, one can use a character set with 512 different symbols. This is not enough for Japanese, Chinese, and Korean, but it is enough for most other purposes.

## SEE ALSO
iconv(1), ascii(7), iso_8859-1(7), unicode(7), utf-8(7)

branch: sisyphus


complex

title: complex(7)

summary: basics of complex mathematics

text:
# complex(7)

## NAME
complex - basics of complex mathematics

## LIBRARY
Math library (libm, -lm)

## SYNOPSIS

```
#include <complex.h>
```

## DESCRIPTION
Complex numbers are numbers of the form z = a+b*i, where a and b are real numbers and i = sqrt(-1), so that i*i = -1.

There are other ways to represent that number. The pair (a,b) of real numbers may be viewed as a point in the plane, given by X- and Y-coordinates. This same point may also be described by giving the pair of real numbers (r,phi), where r is the distance to the origin O, and phi the angle between the X-axis and the line Oz. Now z = r*exp(i*phi) = r*(cos(phi)+i*sin(phi)).

The basic operations are defined on z = a+b*i and w = c+d*i as:

addition: z+w = (a+c) + (b+d)*i

multiplication: z*w = (a*c - b*d) + (a*d + b*c)*i

division: z/w = ((a*c + b*d)/(c*c + d*d)) + ((b*c - a*d)/(c*c + d*d))*i

Nearly all math function have a complex counterpart but there are some complex-only functions.

## EXAMPLES
Your C-compiler can work with complex numbers if it supports the C99 standard. The imaginary unit is represented by I.

```
/* check that exp(i * pi) == -1 */
#include <math.h>        /* for atan */
#include <stdio.h>
#include <complex.h>
int
main(void)
{

    double pi = 4 * atan(1.0);

    double complex z = cexp(I * pi);

    printf("%f + %f * i\n", creal(z), cimag(z));
}
```

## SEE ALSO
cabs(3), cacos(3), cacosh(3), carg(3), casin(3), casinh(3), catan(3), catanh(3), ccos(3), ccosh(3), cerf(3), cexp(3), cexp2(3), cimag(3), clog(3), clog10(3), clog2(3), conj(3), cpow(3), cproj(3), creal(3), csin(3), csinh(3), csqrt(3), ctan(3), ctanh(3)


title: cp1251(7)

summary: CP\ 1251 character set encoded in octal, decimal,

text:
# cp1251(7)

## NAME
cp1251 - CP 1251 character set encoded in octal, decimal, and hexadecimal

## DESCRIPTION
The Windows Code Pages include several 8-bit extensions to the ASCII character set (also known as ISO 646-IRV). CP 1251 encodes the characters used in Cyrillic scripts.

### CP 1251 characters
The following table displays the characters in CP 1251 that are printable and unlisted in the ascii(7) manual page.

Oct

Dec

Hex

Char

Description

200

128

80

Ђ

CYRILLIC CAPITAL LETTER DJE

201

129

81

Ѓ

CYRILLIC CAPITAL LETTER GJE

202

130

82

‚

SINGLE LOW-9 QUOTATION MARK

203

131

83

ѓ

CYRILLIC SMALL LETTER GJE

204

132

84

„

DOUBLE LOW-9 QUOTATION MARK

205

133

85

…

HORIZONTAL ELLIPSIS

206

134

86

†

DAGGER

207

135

87

‡

DOUBLE DAGGER

210

136

88

€

EURO SIGN

211

137

89

‰

PER MILLE SIGN

212

138

8A

Љ

CYRILLIC CAPITAL LETTER LJE

213

139

8B

‹

SINGLE LEFT-POINTING ANGLE QUOTATION MARK

214

140

8C

Њ

CYRILLIC CAPITAL LETTER NJE

215

141

8D

Ќ

CYRILLIC CAPITAL LETTER KJE

216

142

8E

Ћ

CYRILLIC CAPITAL LETTER TSHE

217

143

8F

Џ

CYRILLIC CAPITAL LETTER DZHE

220

144

90

ђ

CYRILLIC SMALL LETTER DJE

221

145

91

‘

LEFT SINGLE QUOTATION MARK

222

146

92

’

RIGHT SINGLE QUOTATION MARK

223

147

93

“

LEFT DOUBLE QUOTATION MARK

224

148

94

”

RIGHT DOUBLE QUOTATION MARK

225

149

95

•

BULLET

226

150

96

–

EN DASH

227

151

97

—

EM DASH

230

152

98

UNDEFINED

231

153

99

™

TRADE MARK SIGN

232

154

9A

љ

CYRILLIC SMALL LETTER LJE

233

155

9B

›

SINGLE RIGHT-POINTING ANGLE QUOTATION MARK

234

156

9C

њ

CYRILLIC SMALL LETTER NJE

235

157

9D

ќ

CYRILLIC SMALL LETTER KJE

236

158

9E

ћ

CYRILLIC SMALL LETTER TSHE

237

159

9F

џ

CYRILLIC SMALL LETTER DZHE

240

160

A0

NO-BREAK SPACE

241

161

A1

Ў

CYRILLIC CAPITAL LETTER SHORT U

242

162

A2

ў

CYRILLIC SMALL LETTER SHORT U

243

163

A3

Ј

CYRILLIC CAPITAL LETTER JE

244

164

A4

¤

CURRENCY SIGN

245

165

A5

Ґ

CYRILLIC CAPITAL LETTER GHE WITH UPTURN

246

166

A6

¦

BROKEN BAR

247

167

A7

§

SECTION SIGN

250

168

A8

Ё

CYRILLIC CAPITAL LETTER IO

251

169

A9

©

COPYRIGHT SIGN

252

170

AA

Є

CYRILLIC CAPITAL LETTER UKRAINIAN IE

253

171

AB

«

LEFT-POINTING DOUBLE ANGLE QUOTATION MARK

254

172

AC

¬

NOT SIGN

255

173

AD

SOFT HYPHEN

256

174

AE

®

REGISTERED SIGN

257

175

AF

Ї

CYRILLIC CAPITAL LETTER YI

260

176

B0

°

DEGREE SIGN

261

177

B1

±

PLUS-MINUS SIGN

262

178

B2

І

CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I

263

179

B3

і

CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I

264

180

B4

ґ

CYRILLIC SMALL LETTER GHE WITH UPTURN

265

181

B5

µ

MICRO SIGN

266

182

B6

¶

PILCROW SIGN

267

183

B7

·

MIDDLE DOT

270

184

B8

ё

CYRILLIC SMALL LETTER IO

271

185

B9

№

NUMERO SIGN

272

186

BA

є

CYRILLIC SMALL LETTER UKRAINIAN IE

273

187

BB

»

RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK

274

188

BC

ј

CYRILLIC SMALL LETTER JE

275

189

BD

Ѕ

CYRILLIC CAPITAL LETTER DZE

276

190

BE

ѕ

CYRILLIC SMALL LETTER DZE

277

191

BF

ї

CYRILLIC SMALL LETTER YI

300

192

C0

А

CYRILLIC CAPITAL LETTER A

301

193

C1

Б

CYRILLIC CAPITAL LETTER BE

302

194

C2

В

CYRILLIC CAPITAL LETTER VE

303

195

C3

Г

CYRILLIC CAPITAL LETTER GHE

304

196

C4

Д

CYRILLIC CAPITAL LETTER DE

305

197

C5

Е

CYRILLIC CAPITAL LETTER IE

306

198

C6

Ж

CYRILLIC CAPITAL LETTER ZHE

307

199

C7

З

CYRILLIC CAPITAL LETTER ZE

310

200

C8

И

CYRILLIC CAPITAL LETTER I

311

201

C9

Й

CYRILLIC CAPITAL LETTER SHORT I

312

202

CA

К

CYRILLIC CAPITAL LETTER KA

313

203

CB

Л

CYRILLIC CAPITAL LETTER EL

314

204

CC

М

CYRILLIC CAPITAL LETTER EM

315

205

CD

Н

CYRILLIC CAPITAL LETTER EN

316

206

CE

О

CYRILLIC CAPITAL LETTER O

317

207

CF

П

CYRILLIC CAPITAL LETTER PE

320

208

D0

Р

CYRILLIC CAPITAL LETTER ER

321

209

D1

С

CYRILLIC CAPITAL LETTER ES

322

210

D2

Т

CYRILLIC CAPITAL LETTER TE

323

211

D3

У

CYRILLIC CAPITAL LETTER U

324

212

D4

Ф

CYRILLIC CAPITAL LETTER EF

325

213

D5

Х

CYRILLIC CAPITAL LETTER HA

326

214

D6

Ц

CYRILLIC CAPITAL LETTER TSE

327

215

D7

Ч

CYRILLIC CAPITAL LETTER CHE

330

216

D8

Ш

CYRILLIC CAPITAL LETTER SHA

331

217

D9

Щ

CYRILLIC CAPITAL LETTER SHCHA

332

218

DA

Ъ

CYRILLIC CAPITAL LETTER HARD SIGN

333

219

DB

Ы

CYRILLIC CAPITAL LETTER YERU

334

220

DC

Ь

CYRILLIC CAPITAL LETTER SOFT SIGN

335

221

DD

Э

CYRILLIC CAPITAL LETTER E

336

222

DE

Ю

CYRILLIC CAPITAL LETTER YU

337

223

DF

Я

CYRILLIC CAPITAL LETTER YA

340

224

E0

а

CYRILLIC SMALL LETTER A

341

225

E1

б

CYRILLIC SMALL LETTER BE

342

226

E2

в

CYRILLIC SMALL LETTER VE

343

227

E3

г

CYRILLIC SMALL LETTER GHE

344

228

E4

д

CYRILLIC SMALL LETTER DE

345

229

E5

е

CYRILLIC SMALL LETTER IE

346

230

E6

ж

CYRILLIC SMALL LETTER ZHE

347

231

E7

з

CYRILLIC SMALL LETTER ZE

350

232

E8

и

CYRILLIC SMALL LETTER I

351

233

E9

й

CYRILLIC SMALL LETTER SHORT I

352

234

EA

к

CYRILLIC SMALL LETTER KA

353

235

EB

л

CYRILLIC SMALL LETTER EL

354

236

EC

м

CYRILLIC SMALL LETTER EM

355

237

ED

н

CYRILLIC SMALL LETTER EN

356

238

EE

о

CYRILLIC SMALL LETTER O

357

239

EF

п

CYRILLIC SMALL LETTER PE

360

240

F0

р

CYRILLIC SMALL LETTER ER

361

241

F1

с

CYRILLIC SMALL LETTER ES

362

242

F2

т

CYRILLIC SMALL LETTER TE

363

243

F3

у

CYRILLIC SMALL LETTER U

364

244

F4

ф

CYRILLIC SMALL LETTER EF

365

245

F5

х

CYRILLIC SMALL LETTER HA

366

246

F6

ц

CYRILLIC SMALL LETTER TSE

367

247

F7

ч

CYRILLIC SMALL LETTER CHE

370

248

F8

ш

CYRILLIC SMALL LETTER SHA

371

249

F9

щ

CYRILLIC SMALL LETTER SHCHA

372

250

FA

ъ

CYRILLIC SMALL LETTER HARD SIGN

373

251

FB

ы

CYRILLIC SMALL LETTER YERU

374

252

FC

ь

CYRILLIC SMALL LETTER SOFT SIGN

375

253

FD

э

CYRILLIC SMALL LETTER E

376

254

FE

ю

CYRILLIC SMALL LETTER YU

377

255

FF

я

CYRILLIC SMALL LETTER YA

## NOTES
CP 1251 is also known as Windows Cyrillic.

## SEE ALSO
ascii(7), charsets(7), cp1252(7), iso_8859-5(7), koi8-r(7), koi8-u(7), utf-8(7)


title: cp1252(7)

summary: CP\ 1252 character set encoded in octal, decimal,

text:
# cp1252(7)

## NAME
cp1252 - CP 1252 character set encoded in octal, decimal, and hexadecimal

## DESCRIPTION
The Windows Code Pages include several 8-bit extensions to the ASCII character set (also known as ISO 646-IRV). CP 1252 encodes the characters used in many West European languages.

### CP 1252 characters
The following table displays the characters in CP 1252 that are printable and unlisted in the ascii(7) manual page.

Oct

Dec

Hex

Char

Description

200

128

80

€

EURO SIGN

202

130

82

‚

SINGLE LOW-9 QUOTATION MARK

203

131

83

ƒ

LATIN SMALL LETTER F WITH HOOK

204

132

84

„

DOUBLE LOW-9 QUOTATION MARK

205

133

85

…

HORIZONTAL ELLIPSIS

206

134

86

†

DAGGER

207

135

87

‡

DOUBLE DAGGER

210

136

88

ˆ

MODIFIER LETTER CIRCUMFLEX ACCENT

211

137

89

‰

PER MILLE SIGN

212

138

8A

Š

LATIN CAPITAL LETTER S WITH CARON

213

139

8B

‹

SINGLE LEFT-POINTING ANGLE QUOTATION MARK

214

140

8C

Œ

LATIN CAPITAL LIGATURE OE

216

142

8E

Ž

LATIN CAPITAL LETTER Z WITH CARON

221

145

91

‘

LEFT SINGLE QUOTATION MARK

222

146

92

’

RIGHT SINGLE QUOTATION MARK

223

147

93

“

LEFT DOUBLE QUOTATION MARK

224

148

94

”

RIGHT DOUBLE QUOTATION MARK

225

149

95

•

BULLET

226

150

96

–

EN DASH

227

151

97

—

EM DASH

230

152

98

˜

SMALL TILDE

231

153

99

™

TRADE MARK SIGN

232

154

9A

š

LATIN SMALL LETTER S WITH CARON

233

155

9B

›

SINGLE RIGHT-POINTING ANGLE QUOTATION MARK

234

156

9C

œ

LATIN SMALL LIGATURE OE

236

158

9E

ž

LATIN SMALL LETTER Z WITH CARON

237

159

9F

Ÿ

LATIN CAPITAL LETTER Y WITH DIAERESIS

240

160

A0

NO-BREAK SPACE

241

161

A1

¡

INVERTED EXCLAMATION MARK

242

162

A2

¢

CENT SIGN

243

163

A3

£

POUND SIGN

244

164

A4

¤

CURRENCY SIGN

245

165

A5

¥

YEN SIGN

246

166

A6

¦

BROKEN BAR

247

167

A7

§

SECTION SIGN

250

168

A8

¨

DIAERESIS

251

169

A9

©

COPYRIGHT SIGN

252

170

AA

ª

FEMININE ORDINAL INDICATOR

253

171

AB

«

LEFT-POINTING DOUBLE ANGLE QUOTATION MARK

254

172

AC

¬

NOT SIGN

255

173

AD

SOFT HYPHEN

256

174

AE

®

REGISTERED SIGN

257

175

AF

¯

MACRON

260

176

B0

°

DEGREE SIGN

261

177

B1

±

PLUS-MINUS SIGN

262

178

B2

²

SUPERSCRIPT TWO

263

179

B3

³

SUPERSCRIPT THREE

264

180

B4

´

ACUTE ACCENT

265

181

B5

µ

MICRO SIGN

266

182

B6

¶

PILCROW SIGN

267

183

B7

·

MIDDLE DOT

270

184

B8

¸

CEDILLA

271

185

B9

¹

SUPERSCRIPT ONE

272

186

BA

º

MASCULINE ORDINAL INDICATOR

273

187

BB

»

RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK

274

188

BC

¼

VULGAR FRACTION ONE QUARTER

275

189

BD

½

VULGAR FRACTION ONE HALF

276

190

BE

¾

VULGAR FRACTION THREE QUARTERS

277

191

BF

¿

INVERTED QUESTION MARK

300

192

C0

À

LATIN CAPITAL LETTER A WITH GRAVE

301

193

C1

Á

LATIN CAPITAL LETTER A WITH ACUTE

302

194

C2

Â

LATIN CAPITAL LETTER A WITH CIRCUMFLEX

303

195

C3

Ã

LATIN CAPITAL LETTER A WITH TILDE

304

196

C4

Ä

LATIN CAPITAL LETTER A WITH DIAERESIS

305

197

C5

Å

LATIN CAPITAL LETTER A WITH RING ABOVE

306

198

C6

Æ

LATIN CAPITAL LETTER AE

307

199

C7

Ç

LATIN CAPITAL LETTER C WITH CEDILLA

310

200

C8

È

LATIN CAPITAL LETTER E WITH GRAVE

311

201

C9

É

LATIN CAPITAL LETTER E WITH ACUTE

312

202

CA

Ê

LATIN CAPITAL LETTER E WITH CIRCUMFLEX

313

203

CB

Ë

LATIN CAPITAL LETTER E WITH DIAERESIS

314

204

CC

Ì

LATIN CAPITAL LETTER I WITH GRAVE

315

205

CD

Í

LATIN CAPITAL LETTER I WITH ACUTE

316

206

CE

Î

LATIN CAPITAL LETTER I WITH CIRCUMFLEX

317

207

CF

Ï

LATIN CAPITAL LETTER I WITH DIAERESIS

320

208

D0

Ð

LATIN CAPITAL LETTER ETH

321

209

D1

Ñ

LATIN CAPITAL LETTER N WITH TILDE

322

210

D2

Ò

LATIN CAPITAL LETTER O WITH GRAVE

323

211

D3

Ó

LATIN CAPITAL LETTER O WITH ACUTE

324

212

D4

Ô

LATIN CAPITAL LETTER O WITH CIRCUMFLEX

325

213

D5

Õ

LATIN CAPITAL LETTER O WITH TILDE

326

214

D6

Ö

LATIN CAPITAL LETTER O WITH DIAERESIS

327

215

D7

×

MULTIPLICATION SIGN

330

216

D8

Ø

LATIN CAPITAL LETTER O WITH STROKE

331

217

D9

Ù

LATIN CAPITAL LETTER U WITH GRAVE

332

218

DA

Ú

LATIN CAPITAL LETTER U WITH ACUTE

333

219

DB

Û

LATIN CAPITAL LETTER U WITH CIRCUMFLEX

334

220

DC

Ü

LATIN CAPITAL LETTER U WITH DIAERESIS

335

221

DD

Ý

LATIN CAPITAL LETTER Y WITH ACUTE

336

222

DE

Þ

LATIN CAPITAL LETTER THORN

337

223

DF

ß

LATIN SMALL LETTER SHARP S

340

224

E0

à

LATIN SMALL LETTER A WITH GRAVE

341

225

E1

á

LATIN SMALL LETTER A WITH ACUTE

342

226

E2

â

LATIN SMALL LETTER A WITH CIRCUMFLEX

343

227

E3

ã

LATIN SMALL LETTER A WITH TILDE

344

228

E4

ä

LATIN SMALL LETTER A WITH DIAERESIS

345

229

E5

å

LATIN SMALL LETTER A WITH RING ABOVE

346

230

E6

æ

LATIN SMALL LETTER AE

347

231

E7

ç

LATIN SMALL LETTER C WITH CEDILLA

350

232

E8

è

LATIN SMALL LETTER E WITH GRAVE

351

233

E9

é

LATIN SMALL LETTER E WITH ACUTE

352

234

EA

ê

LATIN SMALL LETTER E WITH CIRCUMFLEX

353

235

EB

ë

LATIN SMALL LETTER E WITH DIAERESIS

354

236

EC

ì

LATIN SMALL LETTER I WITH GRAVE

355

237

ED

í

LATIN SMALL LETTER I WITH ACUTE

356

238

EE

î

LATIN SMALL LETTER I WITH CIRCUMFLEX

357

239

EF

ï

LATIN SMALL LETTER I WITH DIAERESIS

360

240

F0

ð

LATIN SMALL LETTER ETH

361

241

F1

ñ

LATIN SMALL LETTER N WITH TILDE

362

242

F2

ò

LATIN SMALL LETTER O WITH GRAVE

363

243

F3

ó

LATIN SMALL LETTER O WITH ACUTE

364

244

F4

ô

LATIN SMALL LETTER O WITH CIRCUMFLEX

365

245

F5

õ

LATIN SMALL LETTER O WITH TILDE

366

246

F6

ö

LATIN SMALL LETTER O WITH DIAERESIS

367

247

F7

÷

DIVISION SIGN

370

248

F8

ø

LATIN SMALL LETTER O WITH STROKE

371

249

F9

ù

LATIN SMALL LETTER U WITH GRAVE

372

250

FA

ú

LATIN SMALL LETTER U WITH ACUTE

373

251

FB

û

LATIN SMALL LETTER U WITH CIRCUMFLEX

374

252

FC

ü

LATIN SMALL LETTER U WITH DIAERESIS

375

253

FD

ý

LATIN SMALL LETTER Y WITH ACUTE

376

254

FE

þ

LATIN SMALL LETTER THORN

377

255

FF

ÿ

LATIN SMALL LETTER Y WITH DIAERESIS

## NOTES
CP 1252 is also known as Windows-1252.

## SEE ALSO
ascii(7), charsets(7), cp1251(7), iso_8859-1(7), iso_8859-15(7), utf-8(7)