Forum Discussion

ScotB93's avatar
ScotB93
Copper Contributor
Feb 15, 2023

When pasting SQL into Teams, spaces get switched to NonBreaking Spaces and prevent SQL from running

When you paste SQL into Microsoft Teams, the text is being changed.   The spaces used for Formatting are being changed to Non-Breaking Spaces (UTF-8) and when the user you were sending receives the SQL and they paste it into their query tool, it fails due to invalid characters that the user cannot see.   Only in a hex editor can you see what these characters are.    If you know about the problem, you have to delete all the spaces from your query and add them back in.   PITA.    

 

We just switched to using Office 365 and this became a problem.   The regular version of Teams didn't have this issue.   

  • I also have this problem sometimes. To prevent it, I send the code using the 'code snippet' available on the format button.
    • ZaccaroMatias's avatar
      ZaccaroMatias
      Copper Contributor

      Christovam_Cursino Since a while, even inserting it from the snippet section doesn't work for me. Copying and pasting it changes the format completely. It sounds silly, but SQL queries stop compiling and putting them back together is hard work.

      • LostFocus's avatar
        LostFocus
        Copper Contributor
        Not silly at all. It’s a pain in the butt

Resources