Converting from unicode to ASCII
Richard Gaskin
ambassador at fourthworld.com
Wed Sep 23 14:47:21 EDT 2020
No lookup table is needed at all if the relationship between the
original string and the resulting munged file name never needs to also
work the other direction.
If bidirectional derivation is needed, given the limitations imposed by
AWS' naming limitations I would see no way to avoid requiring a lookup
table.
But so far I haven't read anything requiring this to work in both
directions. Did I miss something? Does she also rely on an unmunger
function?
--
Richard Gaskin
Fourth World Systems
Bob Sneidar wrote:
> Understood, but if it were reversible, it would eliminate the necessity of a lookup table as an intermediary.
>
> Bob S
>
>
>> On Sep 23, 2020, at 11:26 AM, Richard Gaskin via use-livecode <use-livecode at lists.runrev.com> wrote:
>>
>> If I understand her problem correctly, file identification need only be in one direction.
>>
>> As far as I can tell from the description, everything that needs to determine which file to access does so by using a string from which the hashed file name can be derived.
>>
>> That she already has a munger to derive the file name seems to reinforce that.
>>
>> My only suggestion was to change how the existing munger works to satisfy the two problem areas identified: that names not be too long, and that any munger not remove so many characters as to make the file name non-unique or empty.
>>
>> In some respects the benefits of a hash in this case are similar to using a UUID. But UUID is arbitrary and therefore requires establishing and maintaining a lookup table. In contrast, a hash is directly derivable from the file name, providing the same benefit as UUID for this case but without the need for a lookup table.
>>
>> Like the old saying goes, "There are two hard problems in computer science: cache invalidation, and naming things".
>>
>> Lookup tables are effectively a form of cache, a secondary replication of data, very useful at times but best avoided unless absolutely necessary.
>>
>>
>> - Richard Gaskin
>> Fourth World Systems
More information about the use-livecode
mailing list