package body Ada.Strings.UTF_Encoding.Conversions is
use Interfaces;
- -- Version convertion from UTF-8/UTF-16BE/LE to UTF-8/UTF-16BE/LE
+ -- Convert from UTF-8/UTF-16BE/LE to UTF-8/UTF-16BE/LE
function Convert
(Item : UTF_String;
end if;
end Convert;
- -- Version converting UTF-8/UTF-16BE/LE to UTF-16
+ -- Convert from UTF-8/UTF-16BE/LE to UTF-16
function Convert
(Item : UTF_String;
end if;
end Convert;
- -- Version converting UTF-8 to UTF-16
+ -- Convert from UTF-8 to UTF-16
function Convert
(Item : UTF_8_String;
procedure Get_Continuation;
-- Reads a continuation byte of the form 10xxxxxx, shifts R left
-- by 6 bits, and or's in the xxxxxx to the low order 6 bits. On
- -- return Ptr is incremented. Raises exceptioon if continuation
+ -- return Ptr is incremented. Raises exception if continuation
-- byte does not exist or is invalid.
----------------------
elsif C1 <= 16#07FF# then
Result (Len + 1) :=
Character'Val
- (2#110_000000# or Shift_Right (C1, 6));
+ (2#110_00000# or Shift_Right (C1, 6));
Result (Len + 2) :=
Character'Val
(2#10_000000# or (C1 and 2#00_111111#));