Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124885 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 qa.php.net (Postfix) with ESMTPS id 91A051A00B7 for ; Mon, 12 Aug 2024 10:33:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1723458906; bh=8Yn4AxrWY8HsNZAU10jqrorDSvUbFYXpj8DtCRyfGAg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=a6qxSio+QLFy8iS4ERqG9KA0tVGebdaw9s3hEjLBcfqk+DwFe9+khSQXz5ZCeYwoO XQ44uvD/yAmdgSNmpZNnhpaEOEVWg24jKSKds/nEJhCsZYP/bJuzU6E3DpHOTf4WkE AmFL9oTYSBSy+e/MbJQr2Aody7Y8NHoEfMuz7TIrmH3C2aXHINcRqMlk8fpzIytdRw O+Ysg7GpvIiYDqntstvOySWX/7Rin6lW/t/gvnYAPpWjsD0vpvCOc/XLS6dpdH9uc6 MocjQxxML9D2R37vdYeL3g+y+9VGQ99EhcvCX+ZDB70wnyc8Od8kpq7Frav25f3VSn Ki01/mQKHI6IA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 5012F18003E for ; Mon, 12 Aug 2024 10:35:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) (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 ; Mon, 12 Aug 2024 10:35:01 +0000 (UTC) Received: by mail-lj1-f181.google.com with SMTP id 38308e7fff4ca-2ef2cce8be8so44913871fa.1 for ; Mon, 12 Aug 2024 03:33:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723458795; x=1724063595; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=8Yn4AxrWY8HsNZAU10jqrorDSvUbFYXpj8DtCRyfGAg=; b=dXugxjd7qIyZsVJh670X5p3bwsi0Pw1R655rXfaFt3KaWZbrzpogu+pdGpeaj+maT2 npMkOulbfaLWYet1RA/6is4AHolHaNSJMBZLk0QyF3sM9m/lRyjrNIhSPivV0kDM8Xsr TZ7/guRJDVcWj1c/jLckyaKr82Sno2dR09Tcvtex8UZBCfsbGribOW9TLSc0zRWmGGwB 2d32+dbmu/fKoNbf7JRUsaIixb5UsxU7PRppocK5rzaqeMPG8Ud/IMP+Yt6LemvVwa2q FgQvjCuHnXEFEZc/I9vcEsu0/wimM0ZKMRXoUEh3reph6KYNyrAgTl2Y2DU/axvQT8EM 5aCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723458795; x=1724063595; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8Yn4AxrWY8HsNZAU10jqrorDSvUbFYXpj8DtCRyfGAg=; b=DxqQli5L6f8OW+ifEteaACiSxe2C3dk3D95L3ihkcDRAvjLPHrIvaV4f1myg0/4+W3 tYdubZumsjL8dO3c5QHJ0BU2ibyKc7gk0JhmUn7iQQhoYtLo7Ok34l0x+Tw9Hou7UPtb I6qIQdtkb/TToEcUz4RgJqImvoISq6V0kpNqqd+Q6/p2bCmXP69my5jL2OjFs4sZOL4o T1FACe/I6lmzcI0H8mwSjayUo7xhVTiNY5Ixt2Fydk4Ql3+Pu5EMyKZLLUYn8GLSactE 1oTIwrTAmdF5ys+MsZVDp8wbRwkZ3wM1fjIfbEPfwlO6vPU85fVS15nPreMb+/8wFfz/ AJ0g== X-Gm-Message-State: AOJu0Yyki7/mlnlqyJ3Y0pB33xBmhDT3/9qeumM5SqWoYPCyzRB5OJYr Dsz54WHN+oXWVzhkx+kmc/X5HdUe0DOYe4WMycws8LfB3kdlMWY0vmQNcMWdUmRzmz2/Vbv5NVj KMkqDs+zS1xx6lRqzySsr6Th7gt4= X-Google-Smtp-Source: AGHT+IFZD7YQ+tIYEyNNTm853xyhznE8pXtmVvSMfWzTQUw88pXPpmpWLbXJUZdVIYVIR+qkcHl03CEHiReckni38To= X-Received: by 2002:a2e:702:0:b0:2ef:28da:246f with SMTP id 38308e7fff4ca-2f1a6cdbae3mr63333111fa.35.1723458795005; Mon, 12 Aug 2024 03:33:15 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 12 Aug 2024 12:33:03 +0200 Message-ID: Subject: Re: [PHP-DEV][Discussion] Should All String Functions Become Multi-Byte Safe? To: danielhaber@gmail.com Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary="00000000000042ef48061f7a0576" From: landers.robert@gmail.com (Robert Landers) --00000000000042ef48061f7a0576 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Currently, PHP strings are binary safe (thus can store any encoding). I generally think of PHP strings as being an array of bytes vs. a "string" you are familiar with in other languages. The name is unfortunate in that regard, but working with them is straightforward (imagine having an actual array of bytes in PHP and trying to work on them). Robert Landers Software Engineer Utrecht NL On Mon, Aug 12, 2024 at 11:48=E2=80=AFAM wrote: > After reading Rowan's last message, it feels appropriate to link to this: > > "The Absolute Minimum Every Software Developer Must Know About Unicode in > 2023 (Still No Excuses!)" > > https://tonsky.me/blog/unicode/ > > > --00000000000042ef48061f7a0576 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

Currently, PHP strings are binary safe = (thus can store any encoding). I generally think of PHP strings as being an= array of bytes vs. a "string" you are familiar with in other lan= guages. The name is unfortunate in that regard, but working with them is st= raightforward (imagine having an actual array of bytes in PHP and trying to= work on them).

Robert Landers
Software Engineer
Utrecht NL


On Mon, Aug 12, 2024 at 11:48=E2=80=AFAM <danielhaber@gmail.com> wrote:
A= fter reading Rowan's last message, it feels appropriate to link to this= :

"The Absolute Minimum Every Software Developer Must Know Ab= out Unicode in 2023 (Still No Excuses!)"



--00000000000042ef48061f7a0576--