News for hackers. Stuff that matters.
Re:It’s Not Wrong that “ ”.length == 7 by rightbyte on Friday June 02, 2023 @03:15AM (#36162081)
> for western programmers

And by western you mean american, right? You can't even use ASCII in the UK --- '£'.

Re:It’s Not Wrong that “ ”.length == 7 by arcticbull on Friday June 02, 2023 @03:37AM (#36162234)
Yes I was using western as synonymous with ASCII users, and it’s not. My bad.
Re:It’s Not Wrong that “ ”.length == 7 by mjburgess on Friday June 02, 2023 @03:39AM (#36162252)
£ is still just a byte
Re:It’s Not Wrong that “ ”.length == 7 by edent on Friday June 02, 2023 @03:49AM (#36162320)
And yet it is reasonably common to see "£" when the UTF-8 is misinterpreted.
Re:It’s Not Wrong that “ ”.length == 7 by johannes1234321 on Friday June 02, 2023 @03:50AM (#36162322)
When using latin-1/latin-15/iso-8859-1/iso-8859-15/cp1252 that statement is true. With utf-8 it is two bytes (c2 a3), if a software uses utf-16, ucs-2, etc. it may be more.
Re:It’s Not Wrong that “ ”.length == 7 by josefx on Friday June 02, 2023 @03:55AM (#36162374)
Not in any modern encoding and certainly not in ASCII either. Having the highest order bit set makes that kind of problematic.
Re:It’s Not Wrong that “ ”.length == 7 by tuukkah on Friday June 02, 2023 @04:45AM (#36162751)
Nope, says UTF-8.
Re:It’s Not Wrong that “ ”.length == 7 by rightbyte on Friday June 02, 2023 @06:06AM (#36163241)
'u32_pound & 0xff == u32_pound' happens to be true, ye. It doesn't make it a byte. You need the leading 0s.
Re:It’s Not Wrong that “ ”.length == 7 by mjburgess on Friday June 02, 2023 @07:23AM (#36163704)
My mistake
Re:It’s Not Wrong that “ ”.length == 7 by Symbiote on Friday June 02, 2023 @09:26AM (#36164749)
For the UK, you also need to represent the Celtic languages. You'll need at least these letters: â, ê, î, ô, û, ŵ, ŷ, à, è, ì, ò, ù, ẁ (maybe ỳ?), á, é, í, ó, ú, ẃ (maybe ý?), ï (maybe more ¨), ...

Example: https://www.llyw.cymru/ (Welsh government homepage).

Bits of https://www.highland.gov.uk/press (Scottish Highlands council).

(I'll admit most people who don't speak these languages won't bother with the diacritics, unless it's as easy as typing English.)