I am having werid problem. Trying to remove whitespace characters from varchar variable in PostgresSQL. However one space is not removed. I dont know how is this possible.
Variable value: Snímek obrazovky 2019-12-05 v 13.33.37.png
regexp_replace(variable, 's', '_', 'g')
Returns: Snímek_obrazovky_2019-12-05_v 13.33.37.png
(notice a space after _v)
replace(variable, ' ', '_')
Returns: Snímek_obrazovky_2019-12-05_v 13.33.37.png
= the same.
I dont know what else to try. Any ides? Might be some special character in there? Can identify which kind.
2
Answers
Is the way to go.
In UTF8 encoding you can check the codes of all characters in the string: