Encoding of CAPI questions
Posted: July 9th, 2019, 5:10 pm
I recently made an Android application, using CSPro 7.2, but based on an older application, made in 6.3. It is working fine. It uses only one language – Portuguese – in the questions, value sets and error messages. Now I want to have a paper version of the questionnaire and for that I hoped to use ExportXMLMetadata.exe to export the questionnaire as an HTML file, which is then to be transformed into PDF. ExportXMLMetadata.exe asks for a dictionary file (.dcf) and for a question file (.ent.qsf).
I had a look inside the .qsf file and noted that the question text is encoded differently, like in this question:
[QUESTION]
Field=APLICATIONNAME_DICT.P42C
POR={\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang2057{\fonttbl{\f0\fswiss\fprq2\fcharset0 Arial;}{\f1\fnil\fcharset0 Arial;}}
POR={\colortbl ;\red0\green0\blue0;\red0\green0\blue255;}
POR={\*\generator Riched20 10.0.16299}\viewkind4\uc1
POR=\pard\cf1\f0\fs29\lang2070 c. Com que frequ\'eancia o pessoal do Munic\'edpio est\'e1 \b ausente\b0 ?\par
POR=\cf2\i\f1\fs24 (Ler as op\'e7\'f5es)\cf1\i0\f0\fs29\par
POR=}
In the application this question is shown correctly as:
c. Com que frequência o pessoal do Município está ausente?
But in the HTML file it is rendered as
c. Com que frequ�ncia o pessoal do Munic�pio est� ausente?
What can I do to get the question text rendered correctly?
I had a look inside the .qsf file and noted that the question text is encoded differently, like in this question:
[QUESTION]
Field=APLICATIONNAME_DICT.P42C
POR={\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang2057{\fonttbl{\f0\fswiss\fprq2\fcharset0 Arial;}{\f1\fnil\fcharset0 Arial;}}
POR={\colortbl ;\red0\green0\blue0;\red0\green0\blue255;}
POR={\*\generator Riched20 10.0.16299}\viewkind4\uc1
POR=\pard\cf1\f0\fs29\lang2070 c. Com que frequ\'eancia o pessoal do Munic\'edpio est\'e1 \b ausente\b0 ?\par
POR=\cf2\i\f1\fs24 (Ler as op\'e7\'f5es)\cf1\i0\f0\fs29\par
POR=}
In the application this question is shown correctly as:
c. Com que frequência o pessoal do Município está ausente?
But in the HTML file it is rendered as
c. Com que frequ�ncia o pessoal do Munic�pio est� ausente?
What can I do to get the question text rendered correctly?