CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
Loading...
Searching...
No Matches
Cp437.cpp File Reference

Canonical CP437 <-> Unicode/UTF-8 codec implementation. More...

#include "cdc_core/Cp437.h"

Go to the source code of this file.

Namespaces

namespace  cdc
namespace  cdc::core
namespace  cdc::core::cp437

Functions

uint32_t cdc::core::cp437::toUnicode (uint8_t b)
 Map a CP437 byte to its Unicode codepoint. 0x00-0x7F is ASCII.
uint8_t cdc::core::cp437::fromUnicode (uint32_t cp)
 Map a Unicode codepoint to its CP437 byte, or 0 if it has none.
std::string cdc::core::cp437::fromUtf8 (const char *s)
 Convert a UTF-8 string to CP437 bytes (unmapped chars dropped).
std::string cdc::core::cp437::toUtf8 (const char *s)
 Convert CP437 bytes to a UTF-8 string.

Detailed Description

Canonical CP437 <-> Unicode/UTF-8 codec implementation.

Definition in file Cp437.cpp.