tldr: What’s written is ok, and I’ll show you what it means.
Grammar is something that falls out of the spoken language, not the written one. Punctuation is unrelated to grammar except in that rare circumstance when it signals an audible intonation change meant to alert the listener to some change in the actual underlying grammar. Those cases are hard to come up with, but do exist. All punctuation is just cues for hearing the real language in your head better.
Therefore by that metric, not only is there nothing wrong with the punctuation as written, there cannot be, and no matter how it is written.
So try saying your first example aloud in your head, which I will here write without commas because voices have no commas, just intonation:
- It’s no use repeating the obvious things that have been said by others and that can be found in any encyclopedia.
This is a restrictive that here, which you can tell because it can be substituted by which with no change in meaning or permissibility:
- It’s no use repeating the obvious things which have been said by others and which can be found in any encyclopedia.
We can’t use that in descriptive clauses but we can use both that and which in restrictive ones, so if you can swap them, you know what you have. And the other way around, too. This is grammatical whether with or without its comma:
- They always wake me at three in the morning(,) which really annoys me.
But this is ungrammatical again no matter whether you write the comma or not:
- They always wake me at three in the morning(,) *that really annoys me. [ᴡʀᴏɴɢ]
That one is wrong because it tried to use that for a descriptive clause, and you can only use which for those. The native ear goes HUH? when it hears it, which is what makes it ungrammatical.
As you see, it’s never its punctuation which makes something grammatical or ungrammatical. It’s whether you the right worms oops I mean words have managed to put together right — which this sentence almost did not. Twice. :) It had almost managed not to put the right words together, twice.
As you observe, we do not usually use commas before restrictive clauses in English because there is no intonation change to signal there. Presuming that the writer was a competent one, this means the writer was trying to signal something else by including intonation dips. I believe that what he was signalling was an apocopated version of two appositives, which I’ll use em dashes to set off with a repeated things:
- It’s no use repeating the obvious things — (things) that have been said by others — and (things) that can be found in any encyclopedia.
If you read his punctuation there, the commas, as an indicator of appositives the same way as they’re used for that in this sentence, his pauses will make much more sense. It’s not especially common, so it’s no wonder it caught your eye, but I believe that there is a legitimate reading where it makes perfect sense.
As for this one:
- “That’s the person, if I’m not mistaken, that we were talking about.”
Here you have to read this for syntactic constituents. The phrase if I’m not mistaken is a parenthetical aside. It could have been written:
- “That’s the person — if I’m not mistaken — that we were talking about.”
- “That’s the person (if I’m not mistaken) that we were talking about.”
- “That’s the person (if I’m not mistaken) who/whom we were talking about.”
So the commas are the same as parens or dashes: they’re there to surround the parenthetical statement. Since in the spoken language you cannot hear any punctuation, this cannot change the grammar. They’re just there to help the reader.
These too are all ok:
- “If I’m not mistaken, that’s the person that we were talking about.”
- “If I’m not mistaken, that’s the person we were talking about.”
- “If I’m not mistaken, that’s the person who(m) we were talking about.”
- “If I’m not mistaken, that’s the person about whom we were talking.”
- “If I’m not mistaken, that’s the person about which we were talking.”
All those are fine. About the only thing you can’t do is say:
- “If I’m not mistaken, that’s the person about *that we were talking.” [ᴡʀᴏɴɢ]
Because which cannot function there to start the clause to serve as the object of a preposition.
Don’t allow some simple, perhaps simplistic, mnemonic tip for good writing style such as “don’t use a comma before that” confuse you about the larger surrounding issues or about a sentence’s actual grammar. Such tips exist to break a common pattern in beginning writers unfamiliar with the conventions normally observed in these things. But rest assured that the actual grammar remains intact no matter the punctuation, for any grammatical error will jump out to your ear without seeing the punctuation — just like in my very last bulleted example sentence above, the one with the extra asterisk.