[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is there a way to "asciify" a string?
From: |
Marcin Borkowski |
Subject: |
Re: Is there a way to "asciify" a string? |
Date: |
Wed, 30 May 2018 21:38:33 +0200 |
User-agent: |
mu4e 1.1.0; emacs 27.0.50 |
On 2018-05-30, at 19:05, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Marcin Borkowski <mbork@mbork.pl>
>> Cc: Eli Zaretskii <eliz@gnu.org>, help-gnu-emacs <help-gnu-emacs@gnu.org>
>> Date: Wed, 30 May 2018 12:12:18 +0200
>>
>> > (defun my-ascii-normalize-filter (string)
>> > (require 'cl-lib)
>> > (cl-remove-if (lambda (char)
>> > (> char 127))
>> > (ucs-normalize-NFKD-string string)))
>> >
>> > Maybe one could want to filter out control chars too...
>>
>> Thanks, that's a step in the right direction!
>>
>> However, (my-ascii-normalize-filter "żółć") gived "zoc" and not
>> "zolc"...
>
> That's because ł doesn't have any decompositions. So it stays
> unchanged and is removed because its codepoint is above 127.
I see. This means that I'll have to take care of it on an earlier
stage. Not very elegant - but what could I expect with Unicode? ;-)
Thanks,
--
Marcin Borkowski
http://mbork.pl
- Is there a way to "asciify" a string?, Marcin Borkowski, 2018/05/27
- Re: Is there a way to "asciify" a string?, tomas, 2018/05/27
- Re: Is there a way to "asciify" a string?, Marcin Borkowski, 2018/05/27
- Re: Is there a way to "asciify" a string?, Teemu Likonen, 2018/05/27
- Re: Is there a way to "asciify" a string?, Eli Zaretskii, 2018/05/27
- Re: Is there a way to "asciify" a string?, Teemu Likonen, 2018/05/27
- Re: Is there a way to "asciify" a string?, Tak Kunihiro, 2018/05/28
- Re: Is there a way to "asciify" a string?, Marcin Borkowski, 2018/05/30
- Re: Is there a way to "asciify" a string?, Eli Zaretskii, 2018/05/30
- Re: Is there a way to "asciify" a string?,
Marcin Borkowski <=
- Re: Is there a way to "asciify" a string?, tomas, 2018/05/27
- Re: Is there a way to "asciify" a string?, Eli Zaretskii, 2018/05/28
- Re: Is there a way to "asciify" a string?, tomas, 2018/05/29
- Re: Is there a way to "asciify" a string?, Yuri Khan, 2018/05/27
- Re: Is there a way to "asciify" a string?, Marcin Borkowski, 2018/05/30
- Re: Is there a way to "asciify" a string?, Yuri Khan, 2018/05/30
- Re: Is there a way to "asciify" a string?, Marcin Borkowski, 2018/05/30
- Re: Is there a way to "asciify" a string?, John Mastro, 2018/05/30
- Re: Is there a way to "asciify" a string?, tomas, 2018/05/27
- Re: Is there a way to "asciify" a string?, Philipp Stephani, 2018/05/28