News for hackers. Stuff that matters.
Re:Council Bans Apostrophes on Street Signs to Avoid Databas... by espinielli on Sunday May 05, 2024 @05:14AM (#40263339)
As if database were not able to del with apostrophes or other special characters... Yes you have to sanitize your queries, but you have to do it anyway. Client applications will of course have to be smarter
Re:Council Bans Apostrophes on Street Signs to Avoid Databas... by refset on Sunday May 05, 2024 @05:39AM (#40263444)
H2 offers quite a comprehensive solution for dealing with this:

> [H2] provides a way to enforce usage of parameters when passing user input to the database. This is done by disabling embedded literals in SQL statements. To do this, execute the statement:

> SET ALLOW_LITERALS NONE;

> Literals can only be enabled or disabled by an administrator

https://www.h2database.com/html/advanced.html

Re:Council Bans Apostrophes on Street Signs to Avoid Databas... by ginko on Sunday May 05, 2024 @05:36AM (#40263430)
I think part of the problem with apostrophes is also that there's two characters for it. ' and ’
Re:Council Bans Apostrophes on Street Signs to Avoid Databas... by dark-star on Sunday May 05, 2024 @06:14AM (#40263643)
My keyboard has at least 3 already: ` ´ and ' ...

I guess there are lots more in other languages...

Re:Council Bans Apostrophes on Street Signs to Avoid Databas... by filmor on Sunday May 05, 2024 @11:11AM (#40265460)
The first two are accents, and to me it always looks extremely unprofessional when they are abused as apostrophes.
Re:Council Bans Apostrophes on Street Signs to Avoid Databas... by vundercind on Sunday May 05, 2024 @03:52PM (#40267651)
Right single quote is not less-correct than the neutral character.
Re:Council Bans Apostrophes on Street Signs to Avoid Databas... by ahazred8ta on Sunday May 05, 2024 @05:42AM (#40263462)
The Hawaiʻian ʻokina symbol begs to differ...
Re:Council Bans Apostrophes on Street Signs to Avoid Databas... by chrisjj on Sunday May 05, 2024 @05:48AM (#40263501)
And now they've added the problem of some roads having two names. Such as the example in the article's first photo.
Re:Council Bans Apostrophes on Street Signs to Avoid Databas... by secondcoming on Sunday May 05, 2024 @11:41AM (#40265656)
There’s not though. My iPad gives this one, but that’s probably the fault of Apple thinking they know better.
Re:Council Bans Apostrophes on Street Signs to Avoid Databas... by charlieo88 on Sunday May 05, 2024 @10:37AM (#40265206)
As someone with an apostrophe in my name, it has been my experience whenever I come across this sort of thing, you can be sure the project is crap.
Re:Council Bans Apostrophes on Street Signs to Avoid Databas... by bombcar on Sunday May 05, 2024 @12:57PM (#40266296)
Legally change your name to have \’ such as D\’Armond.

That should break untold numbers of systems.

Re:Council Bans Apostrophes on Street Signs to Avoid Databas... by tsimionescu on Sunday May 05, 2024 @04:38PM (#40268114)
Lots of countries limit what you can name yourself. I very much doubt having a special apostrophe in your name can be a legal requirement.

Either way, apostrophes in names is quite uncommon in many parts of the world, and they are very likely to be ignored even on paper forms in those areas, if they are even allowed.

In general, each area has certain limits on what kinds of names if allows/understands, and it is up to the minority to adapt one way or another. It's very reasonable to want an Irish or maybe even British system to recognize a name like O'Reilly, but it's not really something you can expect of a Japanese system. Just as much as you shouldn't expect a name like 田中 to be recognized in France.

Re:Council Bans Apostrophes on Street Signs to Avoid Databas... by bombcar on Sunday May 05, 2024 @05:40PM (#40268713)
This results in amusing side-effects, like buying a house requiring you to sign every variation of your name that the credit check found, but it can also get you multiple “one per person” signup options, so there’s that, too.
Re:Council Bans Apostrophes on Street Signs to Avoid Databas... by arrowsmith on Sunday May 05, 2024 @04:38PM (#40268118)
It's like the stories of people with the last name "Null" who get errors when trying to enter their name into websites. If that's true then I don't want to think about how poorly built (and insecure) those systems must be.
Re:Council Bans Apostrophes on Street Signs to Avoid Databas... by lyu07282 on Sunday May 05, 2024 @10:47AM (#40265286)
I would argue if you sanitize your input you are already doing it wrong, you should parameterize queries and send the data entirely separately from code.
Re:Council Bans Apostrophes on Street Signs to Avoid Databas... by swasheck on Sunday May 05, 2024 @11:43AM (#40265676)
from a certain perspective, parameterization could be seen as sanitation, no?
Re:Council Bans Apostrophes on Street Signs to Avoid Databas... by bewaretheirs on Sunday May 05, 2024 @12:48PM (#40266217)
If it sanitizes anything, parameterization sanitizes the code, not the data, and has much lower impact on the outside world (because the rest of the world isn't pressured to rename things in the real world to fit arbitrary constraints in the computer).