help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is there a way to "asciify" a string?


From: Eli Zaretskii
Subject: Re: Is there a way to "asciify" a string?
Date: Wed, 30 May 2018 20:05:06 +0300

> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]