Fix regression in non-Unicode systems (#5732)

This commit is contained in:
Marc Bernard 2022-08-26 02:19:24 -04:00 committed by GitHub
parent c90ec52c42
commit 1737957b34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -280,7 +280,11 @@ CLASS zcl_abapgit_dot_abapgit IMPLEMENTATION.
"unicode systems always add the byte order mark to the xml, while non-unicode does not "unicode systems always add the byte order mark to the xml, while non-unicode does not
"this code will always add the byte order mark if it is not in the xml "this code will always add the byte order mark if it is not in the xml
lv_mark = zcl_abapgit_convert=>xstring_to_string_utf8( cl_abap_char_utilities=>byte_order_mark_utf8 ). TRY.
lv_mark = zcl_abapgit_convert=>xstring_to_string_utf8( cl_abap_char_utilities=>byte_order_mark_utf8 ).
CATCH zcx_abapgit_exception ##NO_HANDLER.
* In non-unicode systems, the byte order mark throws an error
ENDTRY.
IF lv_xml(1) <> lv_mark. IF lv_xml(1) <> lv_mark.
CONCATENATE lv_mark lv_xml INTO lv_xml. CONCATENATE lv_mark lv_xml INTO lv_xml.
ENDIF. ENDIF.