Re: The 1001 questions about vbRichClient5 (2020-07-21)
Quote:
Originally Posted by
softv
Actually, I process both utf-8 and utf-16 files.
Working with utf16-files is a bit unusual to me...
(am writing all kind of LOB-Apps for about 30 years now, and encountering such files in daily work, is extremely rare).
Whilst utf-8 is the text-format I encounter daily (in text-files, in web-downloads, in JSON, in XML-files, etc.)
No idea, why you'd want to produce utf16-files "willingly" yourself -
because "chances are very high", that e.g. some csv-file you produced in utf16(LE) format,
as e.g. "WebExports" from your DeskTop-App to some WebServer "not in your responsibility" -
will throw off the "PHP-Web-Admin on the other side" in a big way.
Quote:
Originally Posted by
softv
So, I was looking for utf-16 options too.
If it's speed you want (against local SSDs, avoiding Extra-Multibyte-conversion-API-calls),
there's already enough support IMO, via:
- B = S: New_C.FSO.WriteByteContent(FileName, B) 'just two instructions, to produce a "raw 16Bit-LE-file"
- S = New_C.FSO.ReadTextContent(FileName, True) '<- with IsRaw16Bit=True, one instruction is needed to read back into a VBString
Quote:
Originally Posted by
softv
...the options' defaults not being to utf-8 was somewhat of a surprise to me
Was trying to be compatible to VBs (and VBScript-FSO) Text-routines by default -
writing and reading ANSI in the default-locale when no Params were given in ReadTextContent/WriteTextContent.
If BOMs are detected (in Read-direction), all optional Params are ignored (over-ruled by the BOMs).
Olaf