New StringTools in 11.13.3 beta

[Topic split from EML (email files) columns]

I did not try yet, but that's cool. o) Decoding Base64 in js is actually not a problem, various functions/tools available and working, but for quoted printable, I don't know, so that makes life easy. Having these native should also be much quicker in every way, much appreciated! o)

Was this functionality already available internally because of the mail-stuff built into DO? Could you add support for creating MD5-hashes in the same way? That would be handy for some scripts that currently generate MD5 hashs by js-code, which is slow as hell on specific configurations.

Yeah StringTools is just a wrapper around code we already had, so it made sense to expose it.

There's an FSUtil.Hash function which will work if you don't mind writing the thing you want to MD5 to a temp file to hash it.

I guess we could add a Blob.Hash method to avoid the need for temp files when the data is in-memory.

Or FSUtil.Hash could just take a Blob...

Yeah, that's probably better. Fits with FSUtil.Open which already does that.

Is there a simple way to turn a string into a Blob (of UTF-16, I guess)? If not that might be useful for this and in general.

Thanks. o)

The data I like to hash is in memory (as a string), so something that does: var md5 = FSUtil.Hash(myString); would be handy! o)
Any required in-memory conversion right before is ok, messing with tmp-files is something I'd like to avoid though.

These do not seem to work, both are codepage 1252(?):
=?windows-1252?Q?Best=E4tigung_Ihrer_Zahlung_an_lioncast=5Fgmbh?=
=?Cp1252?Q?Neue_Angebote_Ihrer_bevorzugten_Verk=E4ufer?=

Maybe just a bad prefix? What's the correct syntax to pass the code-page ID, just the id (the number only)?
I tried some variations but did not succeed to decode these.. not supported? o)

The codepage lookup is done using the table in HKEY_CLASSES_ROOT\MIME\Database\Codepage, based on that you would need to use iso-8859-1. You could also use 1252.