Accented characters from a CSV read with the BASIC driver come out garbled

Applies to: version not named in the thread (2017).

Problem

A CSV file imported with the BASIC driver loads fine, except names with accents: a name such as Marie-therese written with accented e's arrives as two or three garbled characters in place of each accented letter.

Solution

  1. Recognise the symptom as UTF-8 text read as single bytes. One answerer said that Clarion's file drivers will not handle UTF-8 for you.
  2. Convert the data after it comes from the driver, from UTF-8 to ANSI. The answerer had his own function that restored the correct accented name, but could not share it.
  3. Options named: CapeSoft's StringTheory has a Utf8ToAnsi method; or take the FromUTF8 procedure from CPXML.INC and CPXML.CLW in the \Libsrc folder and copy just that procedure out, without the whole XML package.
  4. The poster chose StringTheory.

Caveats

  • A first reply guessed the font was at fault and suggested checking the bytes in a hex viewer (E9 for the accented letter) or in TopScan; the next answer identified UTF-8 instead.
  • The thread does not say whether the conversion worked for the poster.

Today (2026)

Not re-tested. Current Clarion builds may handle such text differently; confirm on a current build before adding a conversion step.

Sources: Jose D. (Jun 2017, the question), Bob C., Simon K., Graham D. (Jun 2017) in softvelocity.clarion.databasedrivers.