<gh_stars>0

with open('data/icudt66l.dat', 'rb') as f:
	contents = bytearray(f.read())

# encode the data into the stubdata file
result_text = ""
first = True
for byte in contents:
	if first:
		result_text += str(byte)
	else:
		result_text += ", " + str(byte)
	first = False

new_contents = """
// This file is generated by scripts/inline-data.py, do not edit it manually //

#include "unicode/utypes.h"
#include "unicode/udata.h"
#include "unicode/uversion.h"

extern "C" U_EXPORT const unsigned char U_ICUDATA_ENTRY_POINT [] = {
	%s
};
""" % (result_text,)

with open('icu/stubdata/stubdata.cpp', 'w+') as f:
	f.write(new_contents)