@@ -139,7 +139,7 @@ null-terminated UTF-8 encoded string.
139139
140140### Error recovery
141141
142−It is sometimes desireable to recover from errors when decoding strings
142+It is sometimes desirable to recover from errors when decoding strings
143143that are supposed to be UTF-8 encoded. Programmers should be aware that
144144this can negatively affect the security properties of their application.
145145A common recovery method is to replace malformed sequences with a
@@ -155,8 +155,8 @@ aswell.
155155
156156The following code implements one such recovery strategy. When an
157157unexpected byte is encountered, the sequence up to that point will be
158−replaced and, if the error occured in the middle of a sequence, will
159−retry the byte as if it occured at the beginning of a string. Note that
158+replaced and, if the error occurred in the middle of a sequence, will
159+retry the byte as if it occurred at the beginning of a string. Note that
160160the decode function detects errors as early as possible, so the sequence
161161`0xED 0xA0 0x80` would result in three replacement characters.
162162