Dave,
I used Simplegreen, hard brush, and elbow grease. If you want to go the chemical route, try xylene. I have not tried that, but during bottom painting, xylene is my cleaner upper (use with nitrile gloves). xylene is the key ingredient in "goof off" if you don' want to buy the quart size at home depot/lowes.
Another trick instead of replacing expensive carpeting, try buying black GE silicone II exterior caulking and spreading it on with a flexible putty knife. Works great! the only thing to watch is if the carpet gets wet - make sure you let it dry before covering your boat. The water would be blocked from draining from the carpeting side.
Third season with the carpet repaired this way and no mildew, mold. And repaired area still going strong.
Joe