Re: mdb-export encoding issue (solved)

Rob Hills <[email protected]> Thu, 15 Jun 2017 18:43:58 +0800
Newsgroups gmane.comp.db.mdb-tools.devel
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--===============0813762306241889937==
Content-Type: multipart/alternative;
 boundary="------------661BB60816FAFA89FDAEDE4F"
Content-Language: en-GB

This is a multi-part message in MIME format.
--------------661BB60816FAFA89FDAEDE4F
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hi All,

In case anyone else comes across the same problem in the future, we have
found a solution.

It's a bit unintuitive, but when I tried setting the */MDBICONV/*
variable to CP1252, our extended characters exported correctly.  So, the
command that worked for us is:

MDBICONV=3D"CP1252" mdb-export test-forum.mdb tblThread

On 10/06/17 15:08, Rob Hills wrote:
> I am debugging a project to convert a Forum from WebWiz to phpBB.=20
> WebWiz stores its data in an Access DB and our phpBB forum will be on
> MySQL.
>
> I am using mdb-tools version 0.7.1 on Ubuntu 16.04LTS 64-bit.=20
> According to mdb-ver, the mdb file I am working with is JET4.
>
> The problem I am trying to solve involves forum post text that
> includes some characters outside the basic character set.  A specific
> example is the "half space" character whose UTF-8 representation I
> believe is the 3-byte sequence E2 80 89.  My problem is that when I
> use mdb-export, these characters end up being converted to =C3=A2=E2=82=
=AC=E2=80=B0 (Hex:
> C3 A2 E2 82 AC E2 80 B0).
>
> If I open this database in M$Access and use its export tool, I end up
> with the expected UTF-8 representation of these characters in my
> output file (E2 80 89).
>
> I've Googled extensively and tried various permutations of the
> MDB_JET3_CHARSET and MDBICONV environment variables without any change
> to the output.
>
> For example the following command
>
>     mdb-export test-forum.mdb tblThread
>
> produces exactly the same output as:
>
>     MDB_JET3_CHARSET=3D"UTF-8" mdb-export test-forum.mdb tblThread
>
...

Hope this helps someone else...

--=20
Rob Hills
Waikiki, Western Australia
Mobile: +61 (412) 904-357

--------------661BB60816FAFA89FDAEDE4F
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

<html>
  <head>
    <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf=
-8">
  </head>
  <body text=3D"#000000" bgcolor=3D"#FFFFFF">
    <div class=3D"moz-cite-prefix">Hi All,<br>
      <br>
      In case anyone else comes across the same problem in the future,
      we have found a solution.<br>
      <br>
      It's a bit unintuitive, but when I tried setting the <b><i>MDBICONV=
</i></b>
      variable to CP1252, our extended characters exported correctly.=C2=A0
      So, the command that worked for us is:<br>
      <br>
      MDBICONV=3D"CP1252" mdb-export test-forum.mdb tblThread<br>
      <br>
      On 10/06/17 15:08, Rob Hills wrote:<br>
    </div>
    <blockquote type=3D"cite"
      cite=3D"mid:[email protected].=
au">
      <meta http-equiv=3D"content-type" content=3D"text/html; charset=3Du=
tf-8">
      I am debugging a project to convert a Forum from WebWiz to phpBB.=C2=
=A0
      WebWiz stores its data in an Access DB and our phpBB forum will be
      on MySQL.
      <p>I am using mdb-tools version 0.7.1 on Ubuntu 16.04LTS 64-bit.=C2=
=A0
        According to mdb-ver, the mdb file I am working with is JET4.<br>
      </p>
      <p>The problem I am trying to solve involves forum post text that
        includes some characters outside the basic character set.=C2=A0 A
        specific example is the "half space" character whose UTF-8
        representation I believe is the 3-byte sequence E2 80 89.=C2=A0 M=
y
        problem is that when I use mdb-export, these characters end up
        being converted to =C3=A2=E2=82=AC=E2=80=B0 (Hex: C3 A2 E2 82 AC =
E2 80 B0).</p>
      <p>If I open this database in M$Access and use its export tool, I
        end up with the expected UTF-8 representation of these
        characters in my output file (E2 80 89).</p>
      <p>I've Googled extensively and tried various permutations of the
        MDB_JET3_CHARSET and MDBICONV environment variables without any
        change to the output.</p>
      <p>For example the following command</p>
      <blockquote>
        <p>mdb-export test-forum.mdb tblThread</p>
      </blockquote>
      <p>produces exactly the same output as:</p>
      <blockquote>
        <p>MDB_JET3_CHARSET=3D"UTF-8" mdb-export test-forum.mdb tblThread=
</p>
      </blockquote>
    </blockquote>
    ...<br>
    <p>Hope this helps someone else...<br>
    </p>
    <div class=3D"moz-signature">-- <br>
      Rob Hills<br>
      Waikiki, Western Australia<br>
      Mobile: +61 (412) 904-357
    </div>
  </body>
</html>

--------------661BB60816FAFA89FDAEDE4F--


--===============0813762306241889937==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
--===============0813762306241889937==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
mdbtools-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mdbtools-dev

--===============0813762306241889937==--