mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:07:36 +00:00
LibUnicode: Download and parse IDNA data
This commit is contained in:
parent
cfd0a60863
commit
7d9fe44039
6 changed files with 324 additions and 30 deletions
34
Userland/Libraries/LibUnicode/IDNA.h
Normal file
34
Userland/Libraries/LibUnicode/IDNA.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* Copyright (c) 2023, Simon Wanner <simon@skyrising.xyz>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Utf32View.h>
|
||||
|
||||
namespace Unicode::IDNA {
|
||||
|
||||
enum class MappingStatus : u8 {
|
||||
Valid,
|
||||
Ignored,
|
||||
Mapped,
|
||||
Deviation,
|
||||
Disallowed,
|
||||
DisallowedStd3Valid,
|
||||
DisallowedStd3Mapped,
|
||||
};
|
||||
|
||||
enum class IDNA2008Status : u8 {
|
||||
NV8,
|
||||
XV8,
|
||||
};
|
||||
|
||||
struct Mapping {
|
||||
MappingStatus status;
|
||||
IDNA2008Status idna_2008_status;
|
||||
Utf32View mapped_to;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue