And also the person's marital state is taken into consideration. Generally if the person is married then he is put to death. Countries like Iran carry the death penalty for homosexuality as well. As for the Islamic view on it you gotta go Google "homosexuality in Islam" Plenty of info on the topic.