At lest in that particular case, the postal code is the same (LV-3401) for both streets.
Coincidentally, at least here, the official addresses are guaranteed to be unique, a city/town can not have two streets with the same name (at least at any single point of time, renaming over centuries gets weird) - naming streets and assigning numbers to houses is not an arbitrary decision that the landowner can make, it is managed/coordinated centrally.
Same code for the two addresses. Liepāja is a major city by local standards but still only has some 80k people and about 15 postal codes cover the entire city. No two streets in the same city are supposed to have the same name per our national rules though.
Because even with no characters messed up, many cities have 2 or more streets with the same name.