alank2 5 Posted March 21, 2023 I've been using: unsigned char data[]={ 255,216,255,225,7,132,69,120,105,102,0,0,77,77,0,42,0,0,0,8,0,12,1,0,0,3,0,0,0,1,1,144,0,0,1,1,0,3,0,0,0,1,1,11,0,0,1,2,0,3,0,0,0,3,0,0,0,158,1,6,0,3,0,0,0,1,0,2,0,0,1,18,0,3,0,0,0,1,0,1,0,0,1,21,0,3,0,0,0,1,0,3,0,0,1,26,0,5,0,0,0,1,0,0,0,164,1,27, 0,5,0,0,0,1,0,0,0,172,1,40,0,3,0,0,0,1,0,2,0,0,1,49,0,2,0,0,0,31,0,0,0,180,1,50,0,2,0,0,0,20,0,0,0,211,135,105,0,4,0,0,0,1,0,0,0,232,0,0,1,32,0,8,0,8,0,8,0,10,252,128,0,0,39,16,0,10,252,128,0,0,39,16,65,100,111,98,101,32,80,104,111,116,111,115,104, ... }; But it is a large amount of data and I wonder if there is a better way? Share this post Link to post
Remy Lebeau 1436 Posted March 21, 2023 (edited) Put the raw data into a separate binary file, and then add an .rc script to your project (or use the Resources and Images dialog) to compile the data file as an RCDATA resource in your final executable's resources. Then, in your code, you can use a TResourceStream whenever you want to access the resource data at runtime. See Resource Files Support (just ignore the part about using a Multi-Device project, this works in a VCL project, too). Edited March 21, 2023 by Remy Lebeau 2 Share this post Link to post
Fr0sT.Brutal 900 Posted March 22, 2023 If it's an important part of the code, storing as array is acceptable. RTL itself stores Unicode table in this manner. Just make a conversion tool to not have to edit that array manually Share this post Link to post
alank2 5 Posted March 22, 2023 Thanks everyone; I'll give the RCDATA thing a try and see how well it works for me. Share this post Link to post