1
0
Fork 0
cl-sites/lisp-docs.github.io/cl-language-reference/chap-13/bd-b-character-concepts.html

168 lines
No EOL
58 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html>
<html lang="en" dir="ltr" class="docs-wrapper plugin-docs plugin-id-default docs-version-current docs-doc-page docs-doc-id-chap-13/bd-b-character-concepts" data-has-hydrated="false">
<head>
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v3.0.1">
<title data-rh="true">13.1 Character Concepts | Common Lisp (New) Language Reference</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://lisp-docs.github.io/cl-language-reference/img/1024px-Lisp_logo.svg.png"><meta data-rh="true" name="twitter:image" content="https://lisp-docs.github.io/cl-language-reference/img/1024px-Lisp_logo.svg.png"><meta data-rh="true" property="og:url" content="https://lisp-docs.github.io/cl-language-reference/chap-13/bd-b-character-concepts"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="google-site-verification" content="Vzaw013_bfdKeUVG89Ch3W1zC9_vH9ID2dPB9Dz0vr0"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="13.1 Character Concepts | Common Lisp (New) Language Reference"><meta data-rh="true" name="description" content="13.1.1 Introduction to Characters"><meta data-rh="true" property="og:description" content="13.1.1 Introduction to Characters"><link data-rh="true" rel="icon" href="../img/favicon.ico"><link data-rh="true" rel="canonical" href="bd-b-character-concepts.html"><link data-rh="true" rel="alternate" href="bd-b-character-concepts.html" hreflang="en"><link data-rh="true" rel="alternate" href="bd-b-character-concepts.html" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://C1F2Q5VM6X-dsn.algolia.net" crossorigin="anonymous"><link rel="preconnect" href="https://www.google-analytics.com">
<link rel="preconnect" href="https://www.googletagmanager.com">
<script async src="https://www.googletagmanager.com/gtag/js?id=G-8TJCE4NSF8"></script>
<script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","G-8TJCE4NSF8",{})</script>
<link rel="search" type="application/opensearchdescription+xml" title="Common Lisp (New) Language Reference" href="../opensearch.xml"><link rel="stylesheet" href="../assets/css/styles.f13b59fe.css">
<script src="../assets/js/runtime~main.02699c25.js" defer="defer"></script>
<script src="../assets/js/main.4f0a7a76.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){try{return new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}}()||function(){try{return localStorage.getItem("theme")}catch(t){}}();t(null!==e?e:"light")}(),function(){try{const c=new URLSearchParams(window.location.search).entries();for(var[t,e]of c)if(t.startsWith("docusaurus-data-")){var a=t.replace("docusaurus-data-","data-");document.documentElement.setAttribute(a,e)}}catch(t){}}()</script><div id="__docusaurus"><div role="region" aria-label="Skip to main content"><a class="skipToContent_fXgn" href="bd-b-character-concepts.html#__docusaurus_skipToContent_fallback">Skip to main content</a></div><nav aria-label="Main" class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Toggle navigation bar" aria-expanded="false" class="navbar__toggle clean-btn" type="button"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="../../index.html" target="_blank" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="../img/logo.svg" alt="Lisp Logo" class="themedComponent_mlkZ themedComponent--light_NVdE"><img src="../img/logo.svg" alt="Lisp Logo" class="themedComponent_mlkZ themedComponent--dark_xIcU"></div><b class="navbar__title text--truncate">Common Lisp Docs</b></a><a href="../../docs/tutorial/index.html" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Tutorial</a><a href="../index.html" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Technical Reference</a><a href="../../docs/whylisp.html" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Why Lisp?</a><a href="../../docs/howto.html" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Guides</a></div><div class="navbar__items navbar__items--right"><a href="../../docs/contribute.html" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Contribute!</a><a href="../../docs/help.html" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Getting Help</a><a href="../../docs/about.html" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">About</a><a href="../../blog.html" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Blog</a><a href="https://github.com/lisp-docs" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><div class="toggle_vylO colorModeToggle_DEke"><button class="clean-btn toggleButton_gllP toggleButtonDisabled_aARS" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)" aria-live="polite"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_pyhR"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_wfgR"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="navbarSearchContainer_Bca1"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search"><span class="DocSearch-Button-Container"><svg width="20" height="20" class="DocSearch-Search-Icon" viewBox="0 0 20 20"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"></span></button></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div id="__docusaurus_skipToContent_fallback" class="main-wrapper mainWrapper_z2l0"><div class="docsWrapper_hBAB"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_sjWU" type="button"></button><div class="docRoot_UBD9"><aside class="theme-doc-sidebar-container docSidebarContainer_YfHR"><div class="sidebarViewport_aRkj"><div class="sidebar_njMd"><nav aria-label="Docs sidebar" class="menu thin-scrollbar menu_SIkG"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="../index.html">Introduction</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-0/intro.html">Contents and Figures</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-1/b-b-scope-purpose-and-history.html">1. Introduction</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-2/c-b-character-syntax.html">2. Syntax</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-3/d-b-evaluation.html">3. Evaluation and Compilation</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-4/e-b-introduction.html">4. Types and Classes</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-5/f-b-generalized-reference.html">5. Data and Control Flow</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-6/g-b-the-loop-facility.html">6. Iteration</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-7/h-b-object-creation-and-initialization.html">7. Objects</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../category/81-structures-dictionary.html">8. Structures</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-9/j-b-condition-system-concepts.html">9. Conditions</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-10/ba-b-symbol-concepts.html">10. Symbols</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-11/bb-b-package-concepts.html">11. Packages</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-12/bc-b-number-concepts.html">12. Numbers</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret menu__link--active" aria-expanded="true" href="bd-b-character-concepts.html">13. Characters</a></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="bd-b-character-concepts.html">13.1 Character Concepts</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist" aria-expanded="false" tabindex="0" href="../category/132-characters-dictionary.html">13.2 Characters Dictionary</a><button aria-label="Expand sidebar category &#x27;13.2 Characters Dictionary&#x27;" type="button" class="clean-btn menu__caret"></button></div></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-14/be-b-cons-concepts.html">14. Conses</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-15/bf-b-array-concepts.html">15. Arrays</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-16/bg-b-string-concepts.html">16. Strings</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-17/bh-b-sequence-concepts.html">17. Sequences</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-18/bi-b-hash-table-concepts.html">18. Hash Tables</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-19/bj-b-overview-of-filenames.html">19. Filenames</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-20/ca-b-file-system-concepts.html">20. Files</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-21/cb-b-stream-concepts.html">21. Streams</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-22/cc-b-the-lisp-printer.html">22. Printer</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-23/cd-b-reader-concepts.html">23. Reader</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-24/ce-b-system-construction-concepts.html">24. System Construction</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-25/cf-b-the-external-environment.html">25. External Environment</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../environments.html">26. Environments</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../meta-object-protocol.html">27. Meta Object Protocol</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../data-structures.html">28. Data Structures</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../portability/trivial-packages.html">29. Portability</a></div></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="../dictionary-entries.html">dictionary-entries</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-26/intro.html">Glossary</a></div></li></ul></nav></div></div></aside><main class="docMainContainer_TBSr"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_VOVn"><div class="docItemContainer_Djhp"><article><nav class="theme-doc-breadcrumbs breadcrumbsContainer_Z_bl" aria-label="Breadcrumbs"><ul class="breadcrumbs" itemscope="" itemtype="https://schema.org/BreadcrumbList"><li class="breadcrumbs__item"><a aria-label="Home page" class="breadcrumbs__link" href="../index.html"><svg viewBox="0 0 24 24" class="breadcrumbHomeIcon_YNFT"><path d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z" fill="currentColor"></path></svg></a></li><li class="breadcrumbs__item"><span class="breadcrumbs__link">13. Characters</span><meta itemprop="position" content="1"></li><li itemscope="" itemprop="itemListElement" itemtype="https://schema.org/ListItem" class="breadcrumbs__item breadcrumbs__item--active"><span class="breadcrumbs__link" itemprop="name">13.1 Character Concepts</span><meta itemprop="position" content="2"></li></ul></nav><div class="tocCollapsible_ETCw theme-doc-toc-mobile tocMobile_ITEo"><button type="button" class="clean-btn tocCollapsibleButton_TO0P">On this page</button></div><div class="theme-doc-markdown markdown"><h1>13.1 Character Concepts</h1>
<!-- -->
<!-- -->
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="1311-introduction-to-characters">13.1.1 Introduction to Characters<a href="bd-b-character-concepts.html#1311-introduction-to-characters" class="hash-link" aria-label="Direct link to 13.1.1 Introduction to Characters" title="Direct link to 13.1.1 Introduction to Characters"></a></h2>
<!-- -->
<p>A <span><i>character</i></span> is an <span><i>object</i></span> that represents a unitary token (<em>e.g.</em>, a letter, a special symbol, or a “control character”) in an aggregate quantity of text (<em>e.g.</em>, a <span><i>string</i></span> or a text <span><i>stream</i></span>).</p>
<p>Common Lisp allows an implementation to provide support for international language <span><i>characters</i></span> as well as <span><i>characters</i></span> used in specialized arenas (<em>e.g.</em>, mathematics).</p>
<p>The following figures contain lists of <span><i>defined names</i></span> applicable to <span><i>characters</i></span>.</p>
<p>Figure 131 lists some <span><i>defined names</i></span> relating to <em>character attributes</em> and <em>character predicates</em>.</p>
<p>|</p><p><strong>alpha-char-p char-not-equal char</strong>&gt; </p><p><strong>alphanumericp char-not-greaterp char</strong>&gt;<span><b>=</b></span> </p><p><strong>both-case-p char-not-lessp digit-char-p</strong> </p><p><strong>char-code-limit char/= graphic-char-p char-equal char</strong>&lt; <span><b>lower-case-p</b></span> </p><p><strong>char-greaterp char</strong>&lt;<strong>= standard-char-p char-lessp char= upper-case-p</strong></p>|<p></p>
<p>| :- |</p>
<p><strong>Figure 131. Character defined names 1</strong></p>
<p>Figure 132 lists some <span><i>character</i></span> construction and conversion <span><i>defined names</i></span>.</p>
<p>|</p><p><strong>char-code char-name code-char</strong> </p><p><strong>char-downcase char-upcase digit-char</strong> </p><p><strong>char-int character name-char</strong></p>|<p></p>
<p>| :- |</p>
<p><strong>Figure 132. Character defined names 2</strong></p>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="1312-introduction-to-scripts-and-repertoires">13.1.2 Introduction to Scripts and Repertoires<a href="bd-b-character-concepts.html#1312-introduction-to-scripts-and-repertoires" class="hash-link" aria-label="Direct link to 13.1.2 Introduction to Scripts and Repertoires" title="Direct link to 13.1.2 Introduction to Scripts and Repertoires"></a></h2>
<!-- -->
<!-- -->
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="13121-character-scripts">13.1.2.1 Character Scripts<a href="bd-b-character-concepts.html#13121-character-scripts" class="hash-link" aria-label="Direct link to 13.1.2.1 Character Scripts" title="Direct link to 13.1.2.1 Character Scripts"></a></h3>
<!-- -->
<p>A <span><i>script</i></span> is one of possibly several sets that form an <span><i>exhaustive partition</i></span> of the type <span><b>character</b></span>.</p>
<p>The number of such sets and boundaries between them is <span><i>implementation-defined</i></span>. Common Lisp does not require these sets to be <span><i>types</i></span>, but an <span><i>implementation</i></span> is permitted to define such <span><i>types</i></span> as an extension. Since no <span><i>character</i></span> from one <span><i>script</i></span> can ever be a member of another <span><i>script</i></span>, it is generally more useful to speak about <em>character repertoires</em>.</p>
<p>Although the term “<span><i>script</i></span>” is chosen for definitional compatibility with ISO terminology, no <span><i>conforming implementation</i></span> is required to use any particular <span><i>scripts</i></span> standardized by ISO or by any other standards organization.</p>
<p>Whether and how the <span><i>script</i></span> or <span><i>scripts</i></span> used by any given <span><i>implementation</i></span> are named is <span><i>implementation-dependent</i></span>.</p>
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="13122-character-repertoires">13.1.2.2 Character Repertoires<a href="bd-b-character-concepts.html#13122-character-repertoires" class="hash-link" aria-label="Direct link to 13.1.2.2 Character Repertoires" title="Direct link to 13.1.2.2 Character Repertoires"></a></h3>
<!-- -->
<p>A <span><i>repertoire</i></span> is a <span><i>type specifier</i></span> for a <span><i>subtype</i></span> of <span><i>type</i></span> <span><b>character</b></span>. This term is generally used when describing a collection of <span><i>characters</i></span> independent of their coding. <span><i>Characters</i></span> in <span><i>repertoires</i></span> are only identified by name, by <span><i>glyph</i></span>, or by character description.</p>
<p>A <span><i>repertoire</i></span> can contain <span><i>characters</i></span> from several <span><i>scripts</i></span>, and a <span><i>character</i></span> can appear in more than one <span><i>repertoire</i></span>.</p>
<p>For some examples of <span><i>repertoires</i></span>, see the coded character standards ISO 8859/1, ISO 8859/2, and ISO 6937/2. Note, however, that although the term “<span><i>repertoire</i></span>” is chosen for definitional compatibility with ISO terminology, no <span><i>conforming implementation</i></span> is required to use <span><i>repertoires</i></span> standardized by ISO or any other standards organization.</p>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="1313-character-attributes">13.1.3 Character Attributes<a href="bd-b-character-concepts.html#1313-character-attributes" class="hash-link" aria-label="Direct link to 13.1.3 Character Attributes" title="Direct link to 13.1.3 Character Attributes"></a></h2>
<!-- -->
<p><span><i>Characters</i></span> have only one <em>standardized attribute</em>: a <span><i>code</i></span>. A <span><i>character</i></span> s <span><i>code</i></span> is a non-negative <em>integer</em> . This <span><i>code</i></span> is composed from a character <span><i>script</i></span> and a character label in an <em>implementation dependent</em> way. See the <span><i>functions</i></span> <span><b>char-code</b></span> and <span><b>code-char</b></span>.</p>
<p>Additional, <em>implementation-defined attributes</em> of <span><i>characters</i></span> are also permitted so that, for example, two <span><i>characters</i></span> with the same <span><i>code</i></span> may differ in some other, <span><i>implementation-defined</i></span> way.</p>
<p>For any <em>implementation-defined attribute</em> there is a distinguished value called the <span><i>null</i></span> value for that <span><i>attribute</i></span>. A <span><i>character</i></span> for which each <em>implementation-defined attribute</em> has the null value for that <span><i>attribute</i></span> is called a <em>simple character</em> . If the <span><i>implementation</i></span> has no <em>implementation-defined attributes</em>, then all <span><i>characters</i></span> are <em>simple characters</em>.</p>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="1314-character-categories">13.1.4 Character Categories<a href="bd-b-character-concepts.html#1314-character-categories" class="hash-link" aria-label="Direct link to 13.1.4 Character Categories" title="Direct link to 13.1.4 Character Categories"></a></h2>
<!-- -->
<p>There are several (overlapping) categories of <span><i>characters</i></span> that have no formally associated <span><i>type</i></span> but that are nevertheless useful to name. They include <em>graphic characters</em>, <span><i>alphabetic</i></span><sub>1</sub> <span><i>characters</i></span>, <span><i>characters</i></span> with <span><i>case</i></span> (<span><i>uppercase</i></span> and <em>lowercase characters</em>), <em>numeric characters</em>, <em>alphanumeric characters</em>, and <span><i>digits</i></span> (in a given <span><i>radix</i></span> ).</p>
<p>For each <em>implementation-defined attribute</em> of a <span><i>character</i></span> , the documentation for that <em>implementa tion</em> must specify whether <span><i>characters</i></span> that differ only in that <span><i>attribute</i></span> are permitted to differ in whether are not they are members of one of the aforementioned categories.</p>
<p>Note that these terms are defined independently of any special syntax which might have been enabled in the <span><i>current readtable</i></span>.</p>
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="13141-graphic-characters">13.1.4.1 Graphic Characters<a href="bd-b-character-concepts.html#13141-graphic-characters" class="hash-link" aria-label="Direct link to 13.1.4.1 Graphic Characters" title="Direct link to 13.1.4.1 Graphic Characters"></a></h3>
<!-- -->
<p><span><i>Characters</i></span> that are classified as <span><i>graphic</i></span>, or displayable, are each associated with a glyph, a visual representation of the <span><i>character</i></span> .</p>
<p>A <em>graphic character</em> is one that has a standard textual representation as a single <span><i>glyph</i></span>, such as A or * or =. <span><i>Space</i></span>, which effectively has a blank <span><i>glyph</i></span>, is defined to be a <span><i>graphic</i></span>.</p>
<p>Of the <span><i>standard characters</i></span>, <span><i>newline</i></span> is <span><i>non-graphic</i></span> and all others are <span><i>graphic</i></span>; see Section 2.1.3 (Standard Characters).</p>
<p><span><i>Characters</i></span> that are not <span><i>graphic</i></span> are called <span><i>non-graphic</i></span>. <em>Non-graphic characters</em> are sometimes informally called “formatting characters” or “control characters.”</p>
<p>#\Backspace, #\Tab, #\Rubout, #\Linefeed, #\Return, and #\Page, if they are supported by the <em>implementation</em>, are <em>non-graphic</em>.</p>
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="13142-alphabetic-characters">13.1.4.2 Alphabetic Characters<a href="bd-b-character-concepts.html#13142-alphabetic-characters" class="hash-link" aria-label="Direct link to 13.1.4.2 Alphabetic Characters" title="Direct link to 13.1.4.2 Alphabetic Characters"></a></h3>
<!-- -->
<p>The <span><i>alphabetic</i></span><sub>1</sub> <span><i>characters</i></span> are a subset of the <em>graphic characters</em>. Of the <span><i>standard characters</i></span>, only these are the <span><i>alphabetic</i></span><sub>1</sub> <span><i>characters</i></span>:</p>
<p>A B C D E F G H I J K L M N O P Q R S T U V W X Y Z</p>
<p>a b c d e f g h i j k l m n o p q r s t u v w x y z</p>
<p>Any <i>implementation-defined character</i> that has <i>case</i> must be <i>alphabetic</i><sub>1</sub><sup>. For each <i>implementation</i></sup> defined graphic character that has no <i>case</i>, it is <i>implementation-defined</i> whether that <i>character</i> is <i>alphabetic</i><sub>1</sub>.</p>
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="13143-characters-with-case">13.1.4.3 Characters With Case<a href="bd-b-character-concepts.html#13143-characters-with-case" class="hash-link" aria-label="Direct link to 13.1.4.3 Characters With Case" title="Direct link to 13.1.4.3 Characters With Case"></a></h3>
<!-- -->
<p>The <span><i>characters</i></span> with <span><i>case</i></span> are a subset of the <span><i>alphabetic</i></span><sub>1</sub> <span><i>characters</i></span>. A <span><i>character</i></span> with <span><i>case</i></span> has the property of being either <span><i>uppercase</i></span> or <span><i>lowercase</i></span>. Every <span><i>character</i></span> with <span><i>case</i></span> is in one-to-one correspondence with some other <span><i>character</i></span> with the opposite <span><i>case</i></span>.</p>
<h4 class="anchor anchorWithStickyNavbar_LWe7" id="131431-uppercase-characters">13.1.4.3.1 Uppercase Characters<a href="bd-b-character-concepts.html#131431-uppercase-characters" class="hash-link" aria-label="Direct link to 13.1.4.3.1 Uppercase Characters" title="Direct link to 13.1.4.3.1 Uppercase Characters"></a></h4>
<!-- -->
<p>An uppercase <span><i>character</i></span> is one that has a corresponding <em>lowercase character</em> that is <span><i>different</i></span> (and can be obtained using <span><b>char-downcase</b></span>).</p>
<p>Of the <span><i>standard characters</i></span>, only these are <em>uppercase characters</em>:</p>
<p>A B C D E F G H I J K L M N O P Q R S T U V W X Y Z</p>
<h4 class="anchor anchorWithStickyNavbar_LWe7" id="131432-lowercase-characters">13.1.4.3.2 Lowercase Characters<a href="bd-b-character-concepts.html#131432-lowercase-characters" class="hash-link" aria-label="Direct link to 13.1.4.3.2 Lowercase Characters" title="Direct link to 13.1.4.3.2 Lowercase Characters"></a></h4>
<!-- -->
<p>A lowercase <span><i>character</i></span> is one that has a corresponding <em>uppercase character</em> that is <span><i>different</i></span> (and can be obtained using <span><b>char-upcase</b></span>).</p>
<p>Of the <span><i>standard characters</i></span>, only these are <em>lowercase characters</em>:</p>
<p>a b c d e f g h i j k l m n o p q r s t u v w x y z</p>
<h4 class="anchor anchorWithStickyNavbar_LWe7" id="131433-corresponding-characters-in-the-other-case">13.1.4.3.3 Corresponding Characters in the Other Case<a href="bd-b-character-concepts.html#131433-corresponding-characters-in-the-other-case" class="hash-link" aria-label="Direct link to 13.1.4.3.3 Corresponding Characters in the Other Case" title="Direct link to 13.1.4.3.3 Corresponding Characters in the Other Case"></a></h4>
<!-- -->
<p>The <em>uppercase standard characters</em> A through Z mentioned above respectively correspond to the <em>lowercase standard characters</em> a through z mentioned above. For example, the <em>uppercase character</em> E corresponds to the <em>lowercase character</em> e, and vice versa.</p>
<h4 class="anchor anchorWithStickyNavbar_LWe7" id="131434-case-of-implementation">13.1.4.3.4 Case of Implementation<a href="bd-b-character-concepts.html#131434-case-of-implementation" class="hash-link" aria-label="Direct link to 13.1.4.3.4 Case of Implementation" title="Direct link to 13.1.4.3.4 Case of Implementation"></a></h4>
<!-- -->
<p>An <span><i>implementation</i></span> may define that other <em>implementation-defined graphic characters</em> have <span><i>case</i></span>. Such definitions must always be done in pairs—one <em>uppercase character</em> in one-to-one <em>correspondence</em> with one <em>lowercase character</em> .</p>
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="13144-numeric-characters">13.1.4.4 Numeric Characters<a href="bd-b-character-concepts.html#13144-numeric-characters" class="hash-link" aria-label="Direct link to 13.1.4.4 Numeric Characters" title="Direct link to 13.1.4.4 Numeric Characters"></a></h3>
<!-- -->
<p>The <em>numeric characters</em> are a subset of the <em>graphic characters</em>. Of the <span><i>standard characters</i></span>, only these are <em>numeric characters</em>:</p>
<p>0 1 2 3 4 5 6 7 8 9</p>
<p>For each <em>implementation-defined graphic character</em> that has no <span><i>case</i></span>, the <span><i>implementation</i></span> must define whether or not it is a <em>numeric character</em> .</p>
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="13145-alphanumeric-characters">13.1.4.5 Alphanumeric Characters<a href="bd-b-character-concepts.html#13145-alphanumeric-characters" class="hash-link" aria-label="Direct link to 13.1.4.5 Alphanumeric Characters" title="Direct link to 13.1.4.5 Alphanumeric Characters"></a></h3>
<!-- -->
<p>The set of <em>alphanumeric characters</em> is the union of the set of <span><i>alphabetic</i></span><sub>1</sub> <span><i>characters</i></span> and the set of <em>numeric characters</em>.</p>
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="13146-digits-in-a-radix">13.1.4.6 Digits in a Radix<a href="bd-b-character-concepts.html#13146-digits-in-a-radix" class="hash-link" aria-label="Direct link to 13.1.4.6 Digits in a Radix" title="Direct link to 13.1.4.6 Digits in a Radix"></a></h3>
<!-- -->
<p>What qualifies as a <span><i>digit</i></span> depends on the <span><i>radix</i></span> (an <em>integer</em> between 2 and 36, inclusive). The potential <span><i>digits</i></span> are:</p>
<p>0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z</p>
<p>Their respective weights are 0, 1, 2, <em>. . .</em> 35. In any given radix <em>n</em>, only the first <em>n</em> potential <span><i>digits</i></span> are considered to be <span><i>digits</i></span>. For example, the digits in radix 2 are 0 and 1, the digits in radix 10 are 0 through 9, and the digits in radix 16 are 0 through F.</p>
<p><span><i>Case</i></span> is not significant in <span><i>digits</i></span>; for example, in radix 16, both F and f are <span><i>digits</i></span> with weight 15.</p>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="1315-identity-of-characters">13.1.5 Identity of Characters<a href="bd-b-character-concepts.html#1315-identity-of-characters" class="hash-link" aria-label="Direct link to 13.1.5 Identity of Characters" title="Direct link to 13.1.5 Identity of Characters"></a></h2>
<!-- -->
<p>Two <span><i>characters</i></span> that are <span><b>eql</b></span>, <span><b>char=</b></span>, or <span><b>char-equal</b></span> are not necessarily <span><b>eq</b></span>.</p>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="1316-ordering-of-characters">13.1.6 Ordering of Characters<a href="bd-b-character-concepts.html#1316-ordering-of-characters" class="hash-link" aria-label="Direct link to 13.1.6 Ordering of Characters" title="Direct link to 13.1.6 Ordering of Characters"></a></h2>
<!-- -->
<p>The total ordering on <span><i>characters</i></span> is guaranteed to have the following properties:</p>
<p><em></em> If two <span><i>characters</i></span> have the same <em>implementation-defined attributes</em>, then their ordering by <span><b>char</b></span>&lt; is consistent with the numerical ordering by the predicate &lt; on their code <span><i>attributes</i></span>.</p>
<p><em></em> If two <span><i>characters</i></span> differ in any <span><i>attribute</i></span>, then they are not <span><b>char=</b></span>.</p>
<p><em></em> The total ordering is not necessarily the same as the total ordering on the <em>integers</em> produced by applying <span><b>char-int</b></span> to the <span><i>characters</i></span>.</p>
<p><em></em> While <span><i>alphabetic</i></span><sub>1</sub> <span><i>standard characters</i></span> of a given <span><i>case</i></span> must obey a partial ordering, they need not be contiguous; it is permissible for <span><i>uppercase</i></span> and <em>lowercase characters</em> to be interleaved. Thus <code>(char&lt;= #\a x #\z)</code> is not a valid way of determining whether or not x is a <em>lowercase character</em> .</p>
<p>Of the <span><i>standard characters</i></span>, those which are <span><i>alphanumeric</i></span> obey the following partial ordering:</p>
<ul>
<li><code>A&lt;B&lt;C&lt;D&lt;E&lt;F&lt;G&lt;H&lt;I&lt;J&lt;K&lt;L&lt;M&lt;N&lt;O&lt;P&lt;Q&lt;R&lt;S&lt;T&lt;U&lt;V&lt;W&lt;X&lt;Y&lt;Z</code></li>
<li><code>a&lt;b&lt;c&lt;d&lt;e&lt;f&lt;g&lt;h&lt;i&lt;j&lt;k&lt;l&lt;m&lt;n&lt;o&lt;p&lt;q&lt;r&lt;s&lt;t&lt;u&lt;v&lt;w&lt;x&lt;y&lt;z</code></li>
<li><code>0&lt;1&lt;2&lt;3&lt;4&lt;5&lt;6&lt;7&lt;8&lt;9</code></li>
<li>either <code>9&lt;A</code> or <code>Z&lt;0</code></li>
<li>either <code>9&lt;a</code> or <code>z&lt;0</code></li>
</ul>
<p>This implies that, for <span><i>standard characters</i></span>, <span><i>alphabetic</i></span><sup><a href="bd-b-character-concepts.html#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref="true" aria-describedby="footnote-label">1</a></sup> ordering holds within each <span><i>case</i></span> (<span><i>uppercase</i></span> and <span><i>lowercase</i></span>), and that the <em>numeric characters</em> as a group are not interleaved with <em>alphabetic characters</em>. However, the ordering or possible interleaving of <em>uppercase characters</em> and <em>lowercase characters</em> is <span><i>implementation-defined</i></span>.</p>
<div class="theme-admonition theme-admonition-warning admonition_xJq3 alert alert--warning"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"></path></svg></span>warning</div><div class="admonitionContent_BuS1"><p>We have a missing footnote &quot;<span><i>alphabetic</i></span><sup><a href="bd-b-character-concepts.html#user-content-fn-1" id="user-content-fnref-1-2" data-footnote-ref="true" aria-describedby="footnote-label">1</a></sup>&quot; from the specification. Please help us find it!</p></div></div>
<section data-footnotes="true" class="footnotes"><h2 class="anchor anchorWithStickyNavbar_LWe7 sr-only" id="footnote-label">Footnotes<a href="bd-b-character-concepts.html#footnote-label" class="hash-link" aria-label="Direct link to Footnotes" title="Direct link to Footnotes"></a></h2>
<ol>
<li id="user-content-fn-1">
<p>Unclear where this footnote is in the specification <a href="bd-b-character-concepts.html#user-content-fnref-1" data-footnote-backref="" aria-label="Back to reference 1" class="data-footnote-backref"></a> <a href="bd-b-character-concepts.html#user-content-fnref-1-2" data-footnote-backref="" aria-label="Back to reference 1-2" class="data-footnote-backref"><sup>2</sup></a></p>
</li>
</ol>
</section>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="1317-character-names">13.1.7 Character Names<a href="bd-b-character-concepts.html#1317-character-names" class="hash-link" aria-label="Direct link to 13.1.7 Character Names" title="Direct link to 13.1.7 Character Names"></a></h2>
<!-- -->
<p>The following <em>character names</em> must be present in all <span><i>conforming implementations</i></span>:</p>
<p>Newline</p>
<p>The character that represents the division between lines. An implementation must translate between #\Newline, a single-character representation, and whatever external representation(s) may be used.</p>
<p>Space</p>
<p>The space or blank character.</p>
<p>The following names are <span><i>semi-standard</i></span>; if an <span><i>implementation</i></span> supports them, they should be used for the described <span><i>characters</i></span> and no others.</p>
<p>Rubout</p>
<p>The rubout or delete character.</p>
<p>Page</p>
<p>The form-feed or page-separator character.</p>
<p>Tab</p>
<p>The tabulate character.</p>
<p>Backspace</p>
<p>The backspace character.</p>
<p>Return</p>
<p>The carriage return character.</p>
<p>Linefeed</p>
<p>The line-feed character.</p>
<p>In some <span><i>implementations</i></span>, one or more of these <em>character names</em> might denote a <span><i>standard character</i></span> ; for example, #\Linefeed and #\Newline might be the <em>same character</em> in some <span><i>implementations</i></span>.</p>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="1318-treatment-of-newline-during-input-and-output">13.1.8 Treatment of Newline during Input and Output<a href="bd-b-character-concepts.html#1318-treatment-of-newline-during-input-and-output" class="hash-link" aria-label="Direct link to 13.1.8 Treatment of Newline during Input and Output" title="Direct link to 13.1.8 Treatment of Newline during Input and Output"></a></h2>
<!-- -->
<p>When the character #\Newline is written to an output file, the implementation must take the appropriate action to produce a line division. This might involve writing out a record or translating #\Newline to a CR/LF sequence. When reading, a corresponding reverse transformation must take place.</p>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="1319-character-encodings">13.1.9 Character Encodings<a href="bd-b-character-concepts.html#1319-character-encodings" class="hash-link" aria-label="Direct link to 13.1.9 Character Encodings" title="Direct link to 13.1.9 Character Encodings"></a></h2>
<!-- -->
<p>A <span><i>character</i></span> is sometimes represented merely by its <span><i>code</i></span>, and sometimes by another <em>integer</em> value which is composed from the <span><i>code</i></span> and all <em>implementation-defined attributes</em> (in an <em>implementation defined</em> way that might vary between <em>Lisp images</em> even in the same <span><i>implementation</i></span>). This <em>integer</em> , returned by the function <span><b>char-int</b></span>, is called the characters “encoding.” There is no corresponding function from a characters encoding back to the <span><i>character</i></span> , since its primary intended uses include things like hashing where an inverse operation is not really called for.</p>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="13110-documentation-of-implementation">13.1.10 Documentation of Implementation<a href="bd-b-character-concepts.html#13110-documentation-of-implementation" class="hash-link" aria-label="Direct link to 13.1.10 Documentation of Implementation" title="Direct link to 13.1.10 Documentation of Implementation"></a></h2>
<!-- -->
<!-- -->
<p>An <span><i>implementation</i></span> must document the <em>character scripts</em> it supports. For each <em>character script</em> supported, the documentation must describe at least the following:</p>
<p><em></em> Character labels, glyphs, and descriptions. Character labels must be uniquely named using only Latin capital letters AZ, hyphen (-), and digits 09.</p>
<p><em></em> Reader canonicalization. Any mechanisms by which <span><b>read</b></span> treats <span><i>different</i></span> characters as equivalent must be documented.</p>
<p><em></em> The impact on <span><b>char-upcase</b></span>, <span><b>char-downcase</b></span>, and the case-sensitive <span><i>format directives</i></span>. In particular, for each <span><i>character</i></span> with <span><i>case</i></span>, whether it is <span><i>uppercase</i></span> or <span><i>lowercase</i></span>, and which <span><i>character</i></span> is its equivalent in the opposite case.</p>
<p><em></em> The behavior of the case-insensitive <span><i>functions</i></span> <span><b>char-equal</b></span>, <span><b>char-not-equal</b></span>, <span><b>char-lessp</b></span>, <span><b>char-greaterp</b></span>, <span><b>char-not-greaterp</b></span>, and <span><b>char-not-lessp</b></span>.</p>
<p><em></em> The behavior of any <em>character predicates</em>; in particular, the effects of <span><b>alpha-char-p</b></span>, <span><b>lower-case-p</b></span>, <span><b>upper-case-p</b></span>, <span><b>both-case-p</b></span>, <span><b>graphic-char-p</b></span>, and <span><b>alphanumericp</b></span>.</p>
<p><em></em> The interaction with file I/O, in particular, the supported coded character sets (for example, ISO8859/1-1987) and external encoding schemes supported are documented.</p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/lisp-docs/cl-language-reference/tree/main/docs/chap-13/bd-b-character-concepts.md" target="_blank" rel="noopener noreferrer" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_Z9Sw" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_vwxv"><span class="theme-last-updated">Last updated<!-- --> by <b>daninus14</b></span></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages"><a class="pagination-nav__link pagination-nav__link--prev" href="../chap-12/bc-c-dictionary/zerop_function.html"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">zerop</div></a><a class="pagination-nav__link pagination-nav__link--next" href="../category/132-characters-dictionary.html"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">13.2 Characters Dictionary</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="bd-b-character-concepts.html#1311-introduction-to-characters" class="table-of-contents__link toc-highlight">13.1.1 Introduction to Characters</a></li><li><a href="bd-b-character-concepts.html#1312-introduction-to-scripts-and-repertoires" class="table-of-contents__link toc-highlight">13.1.2 Introduction to Scripts and Repertoires</a><ul><li><a href="bd-b-character-concepts.html#13121-character-scripts" class="table-of-contents__link toc-highlight">13.1.2.1 Character Scripts</a></li><li><a href="bd-b-character-concepts.html#13122-character-repertoires" class="table-of-contents__link toc-highlight">13.1.2.2 Character Repertoires</a></li></ul></li><li><a href="bd-b-character-concepts.html#1313-character-attributes" class="table-of-contents__link toc-highlight">13.1.3 Character Attributes</a></li><li><a href="bd-b-character-concepts.html#1314-character-categories" class="table-of-contents__link toc-highlight">13.1.4 Character Categories</a><ul><li><a href="bd-b-character-concepts.html#13141-graphic-characters" class="table-of-contents__link toc-highlight">13.1.4.1 Graphic Characters</a></li><li><a href="bd-b-character-concepts.html#13142-alphabetic-characters" class="table-of-contents__link toc-highlight">13.1.4.2 Alphabetic Characters</a></li><li><a href="bd-b-character-concepts.html#13143-characters-with-case" class="table-of-contents__link toc-highlight">13.1.4.3 Characters With Case</a><ul><li><a href="bd-b-character-concepts.html#131431-uppercase-characters" class="table-of-contents__link toc-highlight">13.1.4.3.1 Uppercase Characters</a></li><li><a href="bd-b-character-concepts.html#131432-lowercase-characters" class="table-of-contents__link toc-highlight">13.1.4.3.2 Lowercase Characters</a></li><li><a href="bd-b-character-concepts.html#131433-corresponding-characters-in-the-other-case" class="table-of-contents__link toc-highlight">13.1.4.3.3 Corresponding Characters in the Other Case</a></li><li><a href="bd-b-character-concepts.html#131434-case-of-implementation" class="table-of-contents__link toc-highlight">13.1.4.3.4 Case of Implementation</a></li></ul></li><li><a href="bd-b-character-concepts.html#13144-numeric-characters" class="table-of-contents__link toc-highlight">13.1.4.4 Numeric Characters</a></li><li><a href="bd-b-character-concepts.html#13145-alphanumeric-characters" class="table-of-contents__link toc-highlight">13.1.4.5 Alphanumeric Characters</a></li><li><a href="bd-b-character-concepts.html#13146-digits-in-a-radix" class="table-of-contents__link toc-highlight">13.1.4.6 Digits in a Radix</a></li></ul></li><li><a href="bd-b-character-concepts.html#1315-identity-of-characters" class="table-of-contents__link toc-highlight">13.1.5 Identity of Characters</a></li><li><a href="bd-b-character-concepts.html#1316-ordering-of-characters" class="table-of-contents__link toc-highlight">13.1.6 Ordering of Characters</a></li><li><a href="bd-b-character-concepts.html#1317-character-names" class="table-of-contents__link toc-highlight">13.1.7 Character Names</a></li><li><a href="bd-b-character-concepts.html#1318-treatment-of-newline-during-input-and-output" class="table-of-contents__link toc-highlight">13.1.8 Treatment of Newline during Input and Output</a></li><li><a href="bd-b-character-concepts.html#1319-character-encodings" class="table-of-contents__link toc-highlight">13.1.9 Character Encodings</a></li><li><a href="bd-b-character-concepts.html#13110-documentation-of-implementation" class="table-of-contents__link toc-highlight">13.1.10 Documentation of Implementation</a></li></ul></div></div></div></div></main></div></div></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Docs</div><ul class="footer__items clean-list"><li class="footer__item"><a href="../../docs/tutorial.html" target="_blank" rel="noopener noreferrer" class="footer__link-item">Common Lisp Tutorial</a></li><li class="footer__item"><a href="../index.html" target="_blank" rel="noopener noreferrer" class="footer__link-item">Common Lisp Technical Reference</a></li><li class="footer__item"><a href="../../docs/help.html" target="_blank" rel="noopener noreferrer" class="footer__link-item">Help</a></li></ul></div><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://stackoverflow.com/questions/tagged/common-lisp" target="_blank" rel="noopener noreferrer" class="footer__link-item">Stack Overflow<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://discord.gg/hhk46CE" target="_blank" rel="noopener noreferrer" class="footer__link-item">Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://www.reddit.com/r/common_lisp" target="_blank" rel="noopener noreferrer" class="footer__link-item">Reddit<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://irclog.tymoon.eu/libera/commonlisp" target="_blank" rel="noopener noreferrer" class="footer__link-item">IRC<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div><div class="col footer__col"><div class="footer__title">More</div><ul class="footer__items clean-list"><li class="footer__item"><a href="../../blog.html" target="_blank" rel="noopener noreferrer" class="footer__link-item">Blog</a></li><li class="footer__item"><a href="https://github.com/lisp-docs/lisp-docs.github.io" target="_blank" rel="noopener noreferrer" class="footer__link-item">Tutorial and General Content GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://github.com/lisp-docs/cl-language-reference/" target="_blank" rel="noopener noreferrer" class="footer__link-item">Technical Reference GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="../../docs/contribute.html" target="_blank" rel="noopener noreferrer" class="footer__link-item">Contribute to the Docs</a></li></ul></div><div class="col footer__col"><div class="footer__title">Common Lisp Docs</div><ul class="footer__items clean-list"><li class="footer__item"><a href="../../docs/about.html" target="_blank" rel="noopener noreferrer" class="footer__link-item">About</a></li><li class="footer__item"><a href="../../docs/whylisp.html" target="_blank" rel="noopener noreferrer" class="footer__link-item">Why Lisp</a></li><li class="footer__item"><a href="../../docs/getting-started.html" target="_blank" rel="noopener noreferrer" class="footer__link-item">Getting Started</a></li><li class="footer__item"><a href="../../docs/faq.html" target="_blank" rel="noopener noreferrer" class="footer__link-item">FAQ</a></li><li class="footer__item"><a href="../../docs/help.html" target="_blank" rel="noopener noreferrer" class="footer__link-item">Getting Help</a></li><li class="footer__item"><a href="../../docs/howto.html" target="_blank" rel="noopener noreferrer" class="footer__link-item">How To Guides</a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 Common Lisp Docs, MIT License (see GitHub Repo).</div></div></div></footer></div>
</body>
</html>