I've tried Spain, France, Germany, they are usually OK with bikes on trains. I Think Denmark is OK too.
Sometimes even have designated carriages for them.
Sometimes there are limits, like "not on city commuters", "only X bikes in each end of the carriage", "not during rush hours", "not to/from all stations" etc etc.
Ask before you buy your tickets.
It's really bad in Sweden. Basically not allowed on the long-haul trains.
It's kinda-sorta possible to beat the system by taking the wheels off and wrap it all up as a cumbersome bundle instead. You're more likely to be allowed on board with "bulky luggage" than with a bike.