all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Using UTF-8 Graphemes in pcase
@ 2023-08-16  8:23 Heime
  2023-08-16  8:50 ` Anders Munch
  0 siblings, 1 reply; 4+ messages in thread
From: Heime @ 2023-08-16  8:23 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor


I am using a pcase matching strings that include UTF-8 Graphemes.  Would this
be safe to do, or would the match fail should a user not have a specific 
UTF-8 Grapheme available on his system.

  (setq grafm "sumintsl ⨋")

  (pcase grafm
    ("sumintsl ⨋" (imprint seltr "\\sumintsl" "")) )





^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Using UTF-8 Graphemes in pcase
  2023-08-16  8:23 Using UTF-8 Graphemes in pcase Heime
@ 2023-08-16  8:50 ` Anders Munch
  2023-08-16  9:01   ` tomas
  0 siblings, 1 reply; 4+ messages in thread
From: Anders Munch @ 2023-08-16  8:50 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor

Heime wrote:
> I am using a pcase matching strings that include UTF-8 Graphemes.  
> Would this be safe to do, or would the match fail should a user not have a specific
> UTF-8 Grapheme available on his system.

String comparison does not depend on the presence of fonts.  You'll be fine.

regards, Anders


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Using UTF-8 Graphemes in pcase
  2023-08-16  8:50 ` Anders Munch
@ 2023-08-16  9:01   ` tomas
  2023-08-16  9:21     ` Heime
  0 siblings, 1 reply; 4+ messages in thread
From: tomas @ 2023-08-16  9:01 UTC (permalink / raw)
  To: Anders Munch; +Cc: Heime via Users list for the GNU Emacs text editor

[-- Attachment #1: Type: text/plain, Size: 443 bytes --]

On Wed, Aug 16, 2023 at 08:50:13AM +0000, Anders Munch wrote:
> Heime wrote:
> > I am using a pcase matching strings that include UTF-8 Graphemes.  
> > Would this be safe to do, or would the match fail should a user not have a specific
> > UTF-8 Grapheme available on his system.
> 
> String comparison does not depend on the presence of fonts.  You'll be fine.

But watch out for homoglyphs. You do the debugging.

Cheers
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Using UTF-8 Graphemes in pcase
  2023-08-16  9:01   ` tomas
@ 2023-08-16  9:21     ` Heime
  0 siblings, 0 replies; 4+ messages in thread
From: Heime @ 2023-08-16  9:21 UTC (permalink / raw)
  To: tomas; +Cc: Anders Munch, Heime via Users list for the GNU Emacs text editor



------- Original Message -------
On Wednesday, August 16th, 2023 at 9:01 PM, tomas@tuxteam.de <tomas@tuxteam.de> wrote:

But watch out for homoglyphs. You do the debugging. - t

They will be mathematical symbols form the Latex Catalogue.  How does a match happen then ?
What do UTF-8 symbols introduce ?



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-08-16  9:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-16  8:23 Using UTF-8 Graphemes in pcase Heime
2023-08-16  8:50 ` Anders Munch
2023-08-16  9:01   ` tomas
2023-08-16  9:21     ` Heime

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.