How can I return from within a T-SQL the list of all available character sets and code pages ?
You can use the xp_enumcodepages undocumented extended stored procedure to return the list of all available character sets and code pages. This extended stored procedure does not require any parameters.
This is the example to run:
EXEC master..xp_enumcodepages