encoding - Why does ANSI encode csv lead to issues but not Latin-1 encoded ones? -


i reading database record , write csv file.

  • where ; delimiter , crlf row ending
  • and values eclosed with: " value "
  • and every " in value gets escaped \"
  • where escape character \ in vba "

    cell = <a:"hello b">

    cell = "<a:""hello b"">"

    row = <"<a:""hello b"">" ; "<b:""hello a"">"crlf>

now value can contain kind of quotes

  • rigth double quotation marks
  • and left double quotationmarks

which leads missbehaviour if open file in word's merge mail.

however if open csv file in excel working expected.

the vba code openening file is

activedocument.mailmerge.opendatasource filepath

it seems problem encoding

so question should how encode string e.g. iso-8859-1 (latin 1)

it problem encoding

when table in mysql

  • win 1252 (ansi) encoded merge mail loads csv wrongly
  • iso-8859-1 (latin-1) encoded merge mail loads csv correctly

any solutions solve ?


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -