Pure OCaml Yaml 1.2 reader and writer using Bytesrw
at main 724 B view raw
1(*--------------------------------------------------------------------------- 2 Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 SPDX-License-Identifier: ISC 4 ---------------------------------------------------------------------------*) 5 6(** Character encoding detection and handling *) 7 8type t = [ 9 | `Utf8 10 | `Utf16be 11 | `Utf16le 12 | `Utf32be 13 | `Utf32le 14] 15 16val to_string : t -> string 17(** Convert encoding to string representation *) 18 19val pp : Format.formatter -> t -> unit 20(** Pretty-print an encoding *) 21 22val detect : string -> t * int 23(** Detect encoding from BOM or first bytes. 24 Returns (encoding, bom_length) *) 25 26val equal : t -> t -> bool 27(** Test equality of two encodings *)