2
%%--------------------------------------------------------------------
5
%% Copyright Ericsson AB 2008-2009. All Rights Reserved.
7
%% The contents of this file are subject to the Erlang Public License,
8
%% Version 1.1, (the "License"); you may not use this file except in
9
%% compliance with the License. You should have received a copy of the
10
%% Erlang Public License along with this software. If not, it can be
11
%% retrieved online at http://www.erlang.org/.
13
%% Software distributed under the License is distributed on an "AS IS"
14
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
15
%% the License for the specific language governing rights and limitations
19
%%----------------------------------------------------------------------
20
%% File : xmerl_sax_parser_utf16be.erl
23
%% Created : 26 May 2008
24
%%----------------------------------------------------------------------
25
-module(xmerl_sax_parser_utf16be).
27
%%----------------------------------------------------------------------
29
%%----------------------------------------------------------------------
30
-define(STRING_EMPTY, <<>>).
31
-define(STRING(MatchStr), <<MatchStr/big-utf16>>).
32
-define(STRING_REST(MatchStr, Rest), <<MatchStr/big-utf16, Rest/binary>>).
33
-define(APPEND_STRING(Rest, New), <<Rest/binary, New/binary>>).
34
-define(TO_INPUT_FORMAT(Val), unicode:characters_to_binary(Val, unicode, {utf16, big})).
36
%% STRING_REST and STRING_UNBOUND_REST is only different in the list case
37
-define(STRING_UNBOUND_REST(MatchChar, Rest), <<MatchChar/big-utf16, Rest/binary>>).
38
-define(BYTE_ORDER_MARK_1, undefined).
39
-define(BYTE_ORDER_MARK_2, <<16#FE>>).
40
-define(BYTE_ORDER_MARK_REST(Rest), <<16#FE, 16#FF, Rest/binary>>).