Click here to Skip to main content
15,888,454 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: C# 6, you dirty dog! Pin
PIEBALDconsult1-Sep-22 7:00
mvePIEBALDconsult1-Sep-22 7:00 
GeneralTwo of my most frequent issues with .net inconsistencies PinPopular
PIEBALDconsult24-Aug-22 10:28
mvePIEBALDconsult24-Aug-22 10:28 
GeneralRe: Two of my most frequent issues with .net inconsistencies Pin
MarkTJohnson24-Aug-22 10:31
professionalMarkTJohnson24-Aug-22 10:31 
GeneralRe: Two of my most frequent issues with .net inconsistencies Pin
Greg Utas24-Aug-22 11:29
professionalGreg Utas24-Aug-22 11:29 
GeneralRe: Two of my most frequent issues with .net inconsistencies Pin
PIEBALDconsult24-Aug-22 11:37
mvePIEBALDconsult24-Aug-22 11:37 
GeneralRe: Two of my most frequent issues with .net inconsistencies Pin
Greg Utas24-Aug-22 13:35
professionalGreg Utas24-Aug-22 13:35 
GeneralRe: Two of my most frequent issues with .net inconsistencies Pin
englebart1-Sep-22 6:59
professionalenglebart1-Sep-22 6:59 
GeneralRe: Two of my most frequent issues with .net inconsistencies Pin
Richard Deeming24-Aug-22 22:06
mveRichard Deeming24-Aug-22 22:06 
GeneralRe: Two of my most frequent issues with .net inconsistencies Pin
PIEBALDconsult25-Aug-22 3:21
mvePIEBALDconsult25-Aug-22 3:21 
GeneralRe: Two of my most frequent issues with .net inconsistencies Pin
Richard Deeming25-Aug-22 5:05
mveRichard Deeming25-Aug-22 5:05 
GeneralRe: Two of my most frequent issues with .net inconsistencies Pin
PIEBALDconsult25-Aug-22 7:40
mvePIEBALDconsult25-Aug-22 7:40 
GeneralRe: Two of my most frequent issues with .net inconsistencies Pin
Bernhard Hiller25-Aug-22 21:09
Bernhard Hiller25-Aug-22 21:09 
GeneralRe: Two of my most frequent issues with .net inconsistencies Pin
PIEBALDconsult27-Aug-22 6:19
mvePIEBALDconsult27-Aug-22 6:19 
GeneralRe: Two of my most frequent issues with .net inconsistencies Pin
Eddy Vluggen1-Sep-22 3:44
professionalEddy Vluggen1-Sep-22 3:44 
GeneralTECO Macros - show me the codez Pin
MrChug10-Aug-22 17:39
MrChug10-Aug-22 17:39 
GeneralRe: TECO Macros - show me the codez Pin
PIEBALDconsult10-Aug-22 17:44
mvePIEBALDconsult10-Aug-22 17:44 
GeneralRe: TECO Macros - show me the codez Pin
englebart1-Sep-22 7:06
professionalenglebart1-Sep-22 7:06 
GeneralRe: TECO Macros - show me the codez Pin
PIEBALDconsult1-Sep-22 7:28
mvePIEBALDconsult1-Sep-22 7:28 
GeneralWeird: Very confusing Base64 problem (includes quiz) Pin
raddevus21-Jul-22 11:12
mvaraddevus21-Jul-22 11:12 
Do you see what is wrong with the Base64 encoded data (below)?*

*Find answer at bottom of this entry.

Also, don't try decoding the data because it is non-sense because it is base64 of encrypted data.

Had a problem where my Base64 data (all of a sudden) was being corrupted.
However, it is very subtle (see ANSWER at bottom). HINT: Just one char was being corrupted.

Data Only Corrupted After Posting
I couldn't understand this. The data (before I posted it was completely fine).
Only after posting data did it get corrupted (and it's not a URL-encoding thing).

Actually, that is incorrect. The data is posted to the web site & saved in DB with no corruption.
Only after the data is returned as a part of a JSON object is the base64 data corrupted. CRazy!! Confused | :confused:

I Finally Found This Argument At Github - Spoiler ALERT!!
+ sign is changing into \u002B using JsonSerializer.Serialize · Issue #35281 · dotnet/runtime · GitHub[^]

This is a very WEIRD (and obscure) thing. I can't believe I finally figured this out. Now, I will have to implement a fix. Discovering the problem was extremely difficult because the base64 data is upwards of 40K.

Have any of you seen this?

jHx4uha8sCRyiqv8nRVJpRoQPx45ghciXg6PJb8qrxORwmMTN6cLlDIh4PVZenZvh3saEtlGAxZlI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utBaogq6V39T/4w86gz2Ow3qDfbGJh2nqJbE2JTNUbN/UbsEmKfdz7JC2jDjTZ7M3Cl0LXsLZM67\u002BFYZxvBzyKUsjXV3S1eHqLrk/i98yWs9YbSEHurIb7wggOac3MlzLz\u002BYCye2UAQxVE6vt66cv3wXBXLLlfwy3rBNVqSLv60//io\u002BKEnKxF0rIYhb6Sm8TV7ErdDwSBe0sspIcbkfdR4ylVoXbR1PaoqCS0KISqNWXR9x4lz8jnhTKtKLZvphKsVE9GIpGAJrcdmfjoWIMXkmP1TMfiQ/xWl3v/s6FNnbXbSjx3L10\u002BSQ8Ha2ZbDuZNVyDYc8vaCQY6Wr4MywCnqaTbQcJ3DvLJKbmysUMpHd7h1U\u002B4k64cFJ2ltWoBr/btUKH1T/lNV8xtIHo7WISECX0K85WeTxCHR36GUzo9WopffO2hpzAm8bEzKJLug5Qm5D0ej491ep28sSW2cx0Ntq7gdyEITYWRP79qIlvLc/w0wLcHEbRPJd\u002Bwx5QKpOA1oaWEqkpgVJDw00D0pqjM35an/xJdEu78wbM0grn3Ns74SeqjRvft4wvVjZ/








ANSWER
If you guessed that the \u002B should actually be a + character, you are amazing!!
GeneralRe: Weird: Very confusing Base64 problem (includes quiz) Pin
Randor 21-Jul-22 21:40
professional Randor 21-Jul-22 21:40 
GeneralRe: Weird: Very confusing Base64 problem (includes quiz) Pin
raddevus22-Jul-22 2:50
mvaraddevus22-Jul-22 2:50 
GeneralRe: Weird: Very confusing Base64 problem (includes quiz) Pin
Marc Clifton4-Aug-22 4:24
mvaMarc Clifton4-Aug-22 4:24 
GeneralRe: Weird: Very confusing Base64 problem (includes quiz) Pin
RickZeeland10-Aug-22 20:47
mveRickZeeland10-Aug-22 20:47 
GeneralRe: Weird: Very confusing Base64 problem (includes quiz) Pin
Richard Deeming10-Aug-22 21:59
mveRichard Deeming10-Aug-22 21:59 
GeneralRe: Weird: Very confusing Base64 problem (includes quiz) Pin
RickZeeland10-Aug-22 22:20
mveRickZeeland10-Aug-22 22:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.