19

So someone here had the job to merge the current version of our software into another older repo.
(That older repo has some features for future versions, that should be only in there ... don´t ask ... not my decision)

Took him long enough. But he forgot to check one thing while merging: The encoding of the files.

And we´re german...

ALL umlauts, and all other special chars in the code were replaced with this: �
No global replace, because all chars were replaced with the same char.
(Why the fuck do we have special chars in the code in the first place???)

So to not need him to start all over again I compiled a list of common german words containing umlauts and did a global search and replace.

I think I got 90% of the errors like that.
Now he´s going to correct the rest of the errors.

Fuck the comments in the code though.
Just a waste of time...

Comments
  • 2
    ++ for umlauts
  • 0
    @alexThunder Comparing is a bit hard since it happened only in files that needed to be merged with conflicts.

    And yes that´s exactly what he did now.
    Going through all files and change all occurences of that char with a global replace.
  • 1
    ++ for solution 👌
  • 1
    I'd checkout a "good" version in one and the merged version in another folder, than have a script looking for that replacement character, using a regex like `/[\w\.-]+<specialChar>[\w\.-]+/` and then look in the same file in the good folder for that found string, just replace the <specialChar> by a `.` or a list of allowed umlauts.
  • 1
    @Wack No need to compare with the original. Usually we could tell without a problem what the correct char was.
    After we got the code to compile we just searched for the broken char with a regex like this to find it in string constants.
    ^[^!']*�
    (Visual Basic .Net Code, so comments start with ')
Add Comment