Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127608 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id D98D91A00BC for ; Thu, 5 Jun 2025 09:02:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1749114007; bh=lSezFkjgi0P1YXEqjcMBwaajHZwfXTvJLzO+fbzWJEs=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=kJKBl0mlaHIrWp8ZXZ7mfq4oKq+lb1n/ov7azAIBDqRki1hKsbMFLsPc9QEVSSYcc whWRkVsD+DpIAl6dlsMn2926eMPIsQBhMLTkDxO2c0/Xgs9r7zBPz9hfkDi7kUsDv1 /ZRFpqfpfAoLwcRxe+9XmWXNRQuyv8PRAIbQQ3LJFzkXiRxwbNLWW19eEy1F2LqQIo OdqOZxWCwyIj2owVBLY1Ii07YFGM4ECzSDk0dvsOzbB0hs3Dr2y7nkoxPC6N9KXafN WtsVFpzrjGtRvwjuEWEQHeAnXnZlzKj+i0GrB5ALg0XA48gqC9FBSFSWiMgjhr4SDE pHm+jMBCf5vVA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 9FA88180055 for ; Thu, 5 Jun 2025 09:00:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 5 Jun 2025 09:00:06 +0000 (UTC) Received: by mail-lf1-f43.google.com with SMTP id 2adb3069b0e04-5532e0ad84aso797639e87.2 for ; Thu, 05 Jun 2025 02:02:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1749114128; x=1749718928; darn=lists.php.net; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=B2u4xsGHf2qNpeqt/4mTOGX+57SOiruBP6BpDWX4kcY=; b=Dnh2sLMu3wLcTAZAMsE6u9N/tq2Ul5vqBmEz9jeac9Elm5fU77rlh2S2M5Y5oBz+lG 3UkXZEqnIa3Qu0a/Pqgpro67BUmGR39BAFPO5LF8l1CkEY+vk3+kCCGJqf5/ZY6kAaEH arC7EYqMKIbHOm6W4GV1mJOS+DJDToEKZVYQ16WQ6lRqa+h6dfhgue81UmytRdwCKBe6 Ux1MvYfOQ2y+e35wgZzpiJ9fo2FojJfW39G08Y3mRJ8jvnOsWVeFCMh/+ve7wyaV7x2I pUmxIGR2zw2RTX0C7co1fmgWHDT6+VeUnfkLdbkhhYeYubRtzkPvhhvTTeb5Xhk5P5DQ 7oLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749114128; x=1749718928; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=B2u4xsGHf2qNpeqt/4mTOGX+57SOiruBP6BpDWX4kcY=; b=ddGPJngzaQUmZi47p4CYiyoZ+gFdD2SCKu/zggCLVntRyt+MeODIEBO8nNUy1HWRe5 eXhChLjJTGPzUpkgCcU3yzYm8eUJnaMKEWdPCPe9igrnJPyt4ywQpYChfp84DKh2h6bI 9bX6Ox+lnnLs2HhVnE14uMUOEpzlggswYWDVDHH3nNcO+fsjpd0kbukpth8fAmFNx542 rBLprQf0iKRGb3KvvUTYbp0hXZH20b2E6dSkwOgw6a0aOL891AGtOWh8cgGcjCqCrLRE hFaK0BJ2y88wSYA150471WUb0Za8oei4h5H6zqjhmBo78Ua+AL125i0FuzHAOZikVHG5 Kypg== X-Gm-Message-State: AOJu0YzaL+Y3hrWMANyFJnVKS5KAZYhUW+Gd5ZluuSLzqIIMM2sRWWHl J08S6z2paadjdjVoBHPVJdoqMCdEMHvgyszFVB90SxJ6o3c3pdPpUMvg+wNZNg== X-Gm-Gg: ASbGncu6dqhLS2R8o8SOhcbEv7ROfbmB1xyeWfJIPH9vnv1zeNXJM/juakSZYruPDHC PyNYIzVQBgDWqYdkb0OFo8Zr4ItOvG/DYNuMQsy2dXSEv6vjbXbGxVcL1VsRfyTI/8a6eqKLej+ 3C+iG8hZa1y+H1f2+nfSkJ/flwCP+PtYBibxHPpE8vmo+lOzQHjP/1uxgXmyozgNR/iYmffwYsL p7nANK6+NWezhcMBf5Tm9pAJ2LbfZ+lZcz9P3i0VCGJ+685d7wBTrEihXXnLE4LS7MAjS+vbXaZ Y7xESgEzN49WtqX5XynhYghJoYcejH84VWofCNKnH9KwtPxrgllV+W4r/FA3/43DLFR0BWDCrQY +XOdV X-Google-Smtp-Source: AGHT+IHEnzf7XymJuYKPaetiS9dK34PIHPZLSQP/ZOhtr9gpSGaX9mz/FflQUH4+6u9cHxUwU2wkpg== X-Received: by 2002:a05:6000:144e:b0:3a4:ec23:dba5 with SMTP id ffacd0b85a97d-3a51d8ef665mr5720141f8f.5.1749114117587; Thu, 05 Jun 2025 02:01:57 -0700 (PDT) Received: from smtpclient.apple ([89.249.45.14]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a4f00971e4sm24320091f8f.65.2025.06.05.02.01.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Jun 2025 02:01:57 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.600.51.1.1\)) Subject: Re: [PHP-DEV][DISCUSSION] grapheme_* functions adds locale in parameter (or any?) In-Reply-To: Date: Thu, 5 Jun 2025 11:01:46 +0200 Cc: php internals Content-Transfer-Encoding: quoted-printable Message-ID: References: To: youkidearitai X-Mailer: Apple Mail (2.3826.600.51.1.1) From: claude.pache@gmail.com (Claude Pache) > Le 5 juin 2025 =C3=A0 03:04, youkidearitai a = =C3=A9crit : >=20 > Hi, Internals >=20 > I would like adds locale parameter that already there are grapheme_* = functions. > Because Unicode is locale-dependency but grapheme_* functions is not > locale-dependency. >=20 > For example, Add $locale parameter is below. > ``` > grapheme_extract( > string $haystack, > int $size, > int $type =3D GRAPHEME_EXTR_COUNT, > int $offset =3D 0, > int &$next =3D null, > string ?$locale =3D null > ): string|false > grapheme_str_split(string $string, int $length =3D 1, string ?$locale = =3D > null): array|false > grapheme_stripos(string $haystack, string $needle, int $offset =3D 0, > string ?$locale =3D null): int|false > grapheme_stristr(string $haystack, string $needle, bool $beforeNeedle > =3D false, string ?$locale =3D null): string|false > grapheme_strlen(string $string, ?string $locale =3D null): = int|false|null > grapheme_strpos(string $haystack, string $needle, int $offset =3D 0, > string ?$locale =3D null): int|false > grapheme_strripos(string $haystack, string $needle, int $offset =3D 0, > string ?$locale =3D null): int|false > grapheme_strrpos(string $haystack, string $needle, int $offset =3D 0, > string ?$locale =3D null): int|false > grapheme_strstr(string $haystack, string $needle, bool $beforeNeedle =3D= > false, ?$locale =3D null): string|false > grapheme_substr(string $string, int $offset, ?int $length =3D null, > ?string ?$locale =3D null): string|false > ``` >=20 > What do you think? > I would like go to write an RFC if this is fine. >=20 > Regards > Yuya >=20 Hi, A $locale parameter could be added for functions that are = locale-dependant: grapheme_stripos() ,grapheme_stristr(), = grapheme_strripos(), and more generally to any function that deals with = casing. It doesn=E2=80=99t make sense for the other functions. =E2=80=94Claude