From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: John Mastro Newsgroups: gmane.emacs.help Subject: Re: Is there a way to "asciify" a string? Date: Wed, 30 May 2018 19:03:43 -0700 Message-ID: References: <87zi0llisj.fsf@mbork.pl> <20180527073645.GB17354@tuxteam.de> <87y3g5l1h0.fsf@mbork.pl> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1527732139 20844 195.159.176.226 (31 May 2018 02:02:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 31 May 2018 02:02:19 +0000 (UTC) To: Help Gnu Emacs mailing list Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu May 31 04:02:14 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fOCus-0005Lh-EZ for geh-help-gnu-emacs@m.gmane.org; Thu, 31 May 2018 04:02:14 +0200 Original-Received: from localhost ([::1]:41554 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOCwz-0004zK-Ir for geh-help-gnu-emacs@m.gmane.org; Wed, 30 May 2018 22:04:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39693) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOCwX-0004zC-MS for help-gnu-emacs@gnu.org; Wed, 30 May 2018 22:03:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fOCwW-0006Is-Qc for help-gnu-emacs@gnu.org; Wed, 30 May 2018 22:03:57 -0400 Original-Received: from mail-qt0-x234.google.com ([2607:f8b0:400d:c0d::234]:38873) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fOCwW-0006IX-Ls for help-gnu-emacs@gnu.org; Wed, 30 May 2018 22:03:56 -0400 Original-Received: by mail-qt0-x234.google.com with SMTP id x34-v6so12704116qtk.5 for ; Wed, 30 May 2018 19:03:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=2QGO8sATFTCEHVknqH1YHNOectbWlNAqcFvrSDUGCns=; b=E5Axfd2y0ws2FdyM6cA/YW6jS75FR+q1K1E7Rnl2htRhWSmiKz/RN1bRlAQ7u5icfu a7pAiuNMEWTXXvMG1VgdddjsdG6h19UIdNAlX0D5oouQ3NbAHwTLlRBU3k+xKkk8xZyp mHWRqTyor7CmeEPZ7tYyPmjV/pO6TK+cJc+HBr4HOxl7uq8VOKeSLVoTGFCbI5sWB2XT ww0Zf1TImD5/LakKIfw0YIXjII3kpeKe0GTz1yRv1c5FnfNIYKM/5dcC7TX+18BdrdNF sEalhKeqjo/exmuzPruvqZczoS3d57NLyMLsgjI7ukZCldxT/G76z9e2dXBays6dhkRR 6apQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=2QGO8sATFTCEHVknqH1YHNOectbWlNAqcFvrSDUGCns=; b=eJqOeB9/qIy2miCGQcNa13+sGb1jTmTdQwUDzME7MzffGKdop067MN6exmBRAxW0eT 4ufYU19JR0AkaMOwry1YDzvzWxTrZJyxouTh3SxTEPJ/R59/KQ7PNe68/Bwfl7EvnYAP EHfd+cE7H7V7K9/tdZXgL3DWFZNcC8O3d8pmgmWXNLI//JjN6BBwBF3cKYCmrAeIhFpj nJcHPkndwWV2rZ26+7VCRGoJa38XNMELwB7XWuTvIppPahyBNuyE8cVrQH1pqB7XYcAG bXyJmyWqWwCWvNg9YUxMOZ49V3m0NTzTAVDDPFMEEdvsIR6KBoyH5P+3mq3zJ+QrWYnH I+SA== X-Gm-Message-State: APt69E3GAMzTKGiY19HgMkExa0JHjx3iF1gQ1kPLuutftbmli+5ozPM9 x5L9DKvJHsyQXZoGbw6h+831MjaqHkSAZSdolT1Jvy7v X-Google-Smtp-Source: ADUXVKJQmwOiNPpKPMp60cutBhnkQ+DI4AE0FhIXj3OLEln7EiTMHDUePTIL9bT0N/Qf14TiLW4VTiRAknPD6j8iqvg= X-Received: by 2002:a0c:f8c9:: with SMTP id h9-v6mr5024769qvo.122.1527732235528; Wed, 30 May 2018 19:03:55 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::234 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:116918 Archived-At: Yuri Khan wrote: > > I have a person's name (possibly with > > some national characters), and I want to derive a filename from it. It > > doesn't have to be correct in 100% cases. It doesn't even have to be > > unambiguous (there will be a number for that in the filename, too). > > Technically you could use the name of a person as is, as long as it is > representable in Unicode and contains neither the null character nor the > slash character. But I assume you want a filename that is portable betwee= n > file systems, or a filename that can be represented in an URI path segmen= t > without %-encoding, or any combination of the above. > > In that case, the Python unidecode library is probably the closest that y= ou > can find. But make very sure that the people involved never see their own > name=E2=80=99s transliteration. There's also an Emacs Lisp port of unidecode[1] (unidecode "=C5=BC=C3=B3=C5=82=C4=87") ;=3D> "zolc" [1]: https://github.com/sindikat/unidecode