geoview-core
    Preparing search index...

    Function readTextWithBestEncoding

    • Tries to read an ArrayBuffer into a string by guessing different encodings and returning the best that works to read the content.

      Parameters

      • buffer: ArrayBuffer

        The array buffer to read from.

      • encodings: string[] = ...

        The encodings to try, defaults to ['utf-8', 'windows-1252', 'iso-8859-1'].

      Returns { encoding: string; text: string }

      The best text and the best encoding used for the text