Message from discussion
Is it possible to use non-ascii characters in *.txt files?
Date: Thu, 1 Nov 2012 03:34:16 -0700 (PDT)
From: andriyko <ahryts...@gmail.com>
To: robotframework-users@googlegroups.com
Message-Id: <402c47ba-2a85-4094-bfeb-4c430dcc7e4a@googlegroups.com>
Subject: Is it possible to use non-ascii characters in *.txt files?
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_Part_1501_1263772.1351766056126"
------=_Part_1501_1263772.1351766056126
Content-Type: multipart/alternative;
boundary="----=_Part_1502_264497.1351766056126"
------=_Part_1502_264497.1351766056126
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Hello,
I work on email&mbox libraries for RF.
Encountered a problem with MIME objects with custom charsets and encodings.
In Python
from_header =3D email.header.Header()
from_header.append(u'=D0=9F=D0=B5=D1=82=D1=80=D0=BE')
from_header.append('<s...@mail.com>')
msg['From']=3Dfrom_header
An attempt to use =D0=9F=D0=B5=D1=82=D1=80=D0=BE in txt file
UnicodeEncodeError: 'ascii' codec can't encode characters in position
are there any workarounds?
Thanks
------=_Part_1502_264497.1351766056126
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Hello,<br><br>I work on email&mbox libraries for RF.<br>Encountered a p=
roblem with MIME objects with custom charsets and encodings.<br><br>In Pyth=
on<br><br>from_header =3D email.header.Header()<br>from_header.append(u'=D0=
=9F=D0=B5=D1=82=D1=80=D0=BE')<br>from_header.append('<s...@mail.com>'=
)<br>msg['From']=3Dfrom_header<br><br>An attempt to use =D0=9F=D0=B5=D1=82=
=D1=80=D0=BE in txt file<br>UnicodeEncodeError: 'ascii' codec can't encode =
characters in position<br><br>are there any workarounds?<br><br>Thanks<br><=
br><br>
------=_Part_1502_264497.1351766056126--
------=_Part_1501_1263772.1351766056126--