Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #106654
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Joaquin Alzola <Joaquin.Alzola@lebara.com> |
| Newsgroups | comp.lang.python |
| Subject | RE: COnvert to unicode |
| Date | Thu, 7 Apr 2016 23:23:23 +0000 |
| Lines | 44 |
| Message-ID | <mailman.67.1460098875.2253.python-list@python.org> (permalink) |
| References | <DB5PR07MB1496D15C3C8636336BD17DDEF0900@DB5PR07MB1496.eurprd07.prod.outlook.com> <ne680s$sqr$1@ger.gmane.org> <DB5PR07MB1496B4AFBD6EB44DCE138373F0900@DB5PR07MB1496.eurprd07.prod.outlook.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset="us-ascii" |
| Content-Transfer-Encoding | quoted-printable |
| X-Trace | news.uni-berlin.de VdxBUicHtk6b1hXy4oX75gpzn/4hkOR6uhelqO2RsWwQ== |
| Return-Path | <Joaquin.Alzola@lebara.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.037 |
| X-Spam-Evidence | '*H*': 0.93; '*S*': 0.00; 'codecs': 0.09; 'message-----': 0.15; '(also': 0.16; '2016': 0.16; 'privilege.': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'skip:[ 60': 0.16; 'string:': 0.16; 'subject:unicode': 0.16; 'to:addr:web.de': 0.16; 'wrote:': 0.16; '>>>': 0.20; 'to:name:python- list@python.org': 0.20; 'to:2**1': 0.21; 'space.': 0.22; 'import': 0.24; 'header:In-Reply-To:1': 0.24; 'appreciated.': 0.27; 'convert': 0.29; 'url:mailman': 0.30; 'work.': 0.30; 'url:python': 0.33; 'skip:- 10': 0.34; 'url:listinfo': 0.34; 'sent:': 0.35; 'skip:c 30': 0.35; 'unicode': 0.35; 'subject:': 0.35; 'but': 0.36; 'there': 0.36; 'url:org': 0.36; 'email addr:python.org': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'thanks': 0.37; 'charset:us-ascii': 0.37; 'seem': 0.37; 'test': 0.39; 'from:': 0.39; 'url:mail': 0.40; 'to:addr:python.org': 0.40; 'contact': 0.66; 'python-list': 0.66; 'email name:python-list': 0.67; 'subject': 0.70; 'disclose': 0.71; 'otten': 0.84; "skip:' 110": 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=lebara.onmicrosoft.com; s=selector1-lebara-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=O7/ZACCNEb/PklpeoFnlT6nUpomodkvcXdm1aT57nO8=; b=bIrvj+XvHB63PB+xUsGtxqDGYIZvQyFPqehoenedR+us3+lypovkPAADphqNyoWtqBsX5AEF/hBqQW0Z+46HMaBEGYLB4UoEzoIZRJxqn+62vNzcsZCrP/gT9qNV8beRrQPzP5hKDssJsnzHM5bJu2+T//D6B1rRKg/8EaO2QGI= |
| Thread-Topic | COnvert to unicode |
| Thread-Index | AdGQ4iBrjGYPn9YHQMiaI+U/lRusYwAFyopHAArIxDA= |
| In-Reply-To | <ne680s$sqr$1@ger.gmane.org> |
| Accept-Language | en-GB, en-US |
| Content-Language | en-US |
| X-MS-Has-Attach | |
| X-MS-TNEF-Correlator | |
| authentication-results | web.de; dkim=none (message not signed) header.d=none;web.de; dmarc=none action=none header.from=lebara.com; |
| x-originating-ip | [83.231.195.182] |
| x-ms-office365-filtering-correlation-id | 2f746838-4e45-4a98-7126-08d35f3b9d8f |
| x-microsoft-exchange-diagnostics | 1; DB5PR07MB1493; 5:4fnkSaI58HK+fiymgdsmL6/+Sma7/6AnYCvqBpNyv57MWRCZY+TiTc9kbDfTpkjbjUA33j5jixPXYz+8XzXpgiaZc64bB/ulA9ICPu2GR4N/Ezp5VZeHF2SXQabtKjmNFwpF37I0Y9mkrGAR04hJKAMlZGYbzU5ybkkKPkFTA5A=; 24:bnx/gdm54K8p0mb2oh+aqUsHpYxUoSVc1xaOG52T8S6THnXRh61ZdWBf+EI12ZosomhwnLpx2lO0dUI2RAcfIXlHnuxZIzGtUVu5HZUEjy8=; 7:qyOWGwsLdgU/hqvY+0JBfX2Wg0wuk1AK7x9ppdCRVTOuCcVr5X8uh2faXSfSGzHq/+2k+pPr1TDINDIaFpv96O+2H34dW/4rtQeURLIrPCblRoRZATE6BypR1d9NCQYTogziRMnYN6TyzzDZ05yhDikYfidqMpww0CBg7t0nF5/iOw6/zRrSRbipvHQmNpYiR2nbpcnBLF+Jbt/weR+I7vksiT6YuP2ZBjZLj96VweM=; 23:PvpHa4C4zm+jOlHUc5nz9nlYAP6U/wH0IpFytSstBMuRS6gxS05fkGOMm3MYppre2q8mu8j+dkG4Oa2GB8WHPT3GO6j7n0V+pFutImq8tfImINzpYB+b7PqSpifUrNuQ/tXWFjhVmLxgZj8MDVHbf059L2dkYdfMN5k5i78vU8jqpC6VZ9E9YhILv+MnSYzp |
| x-microsoft-antispam | UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DB5PR07MB1493; |
| x-exchange-antispam-report-cfa | BCL:0; PCL:0; RULEID:; SRVR:DB5PR07MB1493; BCL:0; PCL:0; RULEID:; SRVR:DB5PR07MB1493; |
| x-forefront-prvs | 0905A6B2C7 |
| x-forefront-antispam-report | SFV:NSPM; SFS:(10019020)(6009001)(52294002)(13464003)(24454002)(76576001)(122556002)(5001770100001)(3660700001)(1220700001)(33656002)(5003600100002)(86362001)(3846002)(3280700002)(6116002)(5004730100002)(66066001)(102836003)(586003)(3480700003)(15975445007)(5002640100001)(77096005)(92566002)(2950100001)(87936001)(2501003)(54356999)(10400500002)(5008740100001)(2900100001)(11100500001)(189998001)(19580405001)(50986999)(76176999)(74316001)(107886002)(19580395003)(9686002); DIR:OUT; SFP:1102; SCL:1; SRVR:DB5PR07MB1493; H:DB5PR07MB1496.eurprd07.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en; |
| spamdiagnosticoutput | 1:23 |
| spamdiagnosticmetadata | NSPM |
| X-MS-Exchange-CrossTenant-originalarrivaltime | 07 Apr 2016 23:23:23.9567 (UTC) |
| X-MS-Exchange-CrossTenant-fromentityheader | Hosted |
| X-MS-Exchange-CrossTenant-id | d7093539-83cd-4991-b1b3-aacef74cf097 |
| X-MS-Exchange-Transport-CrossTenantHeadersStamped | DB5PR07MB1493 |
| X-OriginatorOrg | lebara.com |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.21 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| X-Mailman-Original-Message-ID | <DB5PR07MB1496B4AFBD6EB44DCE138373F0900@DB5PR07MB1496.eurprd07.prod.outlook.com> |
| X-Mailman-Original-References | <DB5PR07MB1496D15C3C8636336BD17DDEF0900@DB5PR07MB1496.eurprd07.prod.outlook.com> <ne680s$sqr$1@ger.gmane.org> |
| Xref | csiph.com comp.lang.python:106654 |
Show key headers only | View raw
Thanks Peter. Much appreciate will look into codecs and how they work.
-----Original Message-----
From: Python-list [mailto:python-list-bounces+joaquin.alzola=lebara.com@python.org] On Behalf Of Peter Otten
Sent: 07 April 2016 19:14
To: python-list@python.org
Subject: Re: COnvert to unicode
Joaquin Alzola wrote:
> Hi People
>
> I need to covert this string:
>
> hello there
> this is a test
>
> (also \n important)
>
> To this Unicode:
>
00680065006c006c006f0020002000740068006500720065000a00740068006900730020006900730020006100200074006500730074000a
> Without the \u and space.
>
> https://www.branah.com/unicode-converter
>
> I seem not to be able to do that conversion.
>
> Help to guide me will be appreciated.
>>> import codecs
>>> s = u"hello there\nthis is a test\n"
>>> codecs.encode(s.encode("utf-16-be"), "hex")
'00680065006c006c006f0020002000740068006500720065000a00740068006900730020006900730020006100200074006500730074000a'
--
https://mail.python.org/mailman/listinfo/python-list
This email is confidential and may be subject to privilege. If you are not the intended recipient, please do not copy or disclose its content but contact the sender immediately upon receipt.
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
RE: COnvert to unicode Joaquin Alzola <Joaquin.Alzola@lebara.com> - 2016-04-07 23:23 +0000
csiph-web