(using vb.net)
Hi,
I have an ini file where I need to post an RTF file as a single line in the ini file – like…
[my section]
rtf_file_1=bla bla bla (the content of the rtf file)
To avoid linebreaks, special codes etc. in the RTF file from wrapping in the ini file, how can I encode (and decode) it as a single string?
I was thing if there was a function to convert a string (in my case the content of the RTF file) into a line of numbers and then decode it back?
What would you do?
Thanks!
You can encode them using base64 encoding. Like that the content gets treated binary –> it can be any type of file.
But of course in the config file you wont be able to read the content of the file.
Here a Snippet to Base64 encode / decode
and in VB.NET: