ICU has character set detection. Looks like it wouldn’t be that hard to add a function to return either the best match or an array of encoding -> confidence. Perhaps dd an enhancement request if there isn’t one already.
Cheers Monte > On 13 Feb 2018, at 1:04 pm, Paul Dupuis via use-livecode > <use-livecode@lists.runrev.com> wrote: > > It is this last case (no BOM) that a 'guessEncoding(<file>)' function is > needed in LiveCode so those of us that make app that deal with end user > files (which can be of variable 'type' and whose encoding is generally > completely unknown to the user) do no have to each write our own. > > I will happily offer the guessEncoding script we wrote from common > algorithms for this task if only LiveCode would add it to the engine. Or > any one else that has written a guessEncoding script could offer these > and LiveCode could pick the "best" one and add it to the engine. _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode