Topic: [solved] Request for native UTF8 functions
Hi,
In the topic "[solved] LoadFromFile : Load a UTF8 file content as a string" I made a function to load a file (UTF8) into a string.
It works but is very slow : 58 seconds for a file of 400Ko.
I made the same in C# (and call it from MVD), the job is done in less than 1s (?!).
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
var utf8 = File.ReadAllText("rss.xml");
using (StreamWriter sw = new StreamWriter(File.Open("rss.out", FileMode.Create), Encoding.Unicode))
{
sw.WriteLine(utf8);
}
}
}
}
Dmitry could you, please, include fast native functions to encode/decode UTF8 string (previously loaded with TFileStream) ?
Regards,
jihem
https://jihem.itch.io