The million dollar question is "what do you mean by an enchanter?" Do you mean a character whose schtick is enchantment spells? Or do you want a character who only uses enchantment spells? (I'm assuming in combat here because I don't think an enchanter's viability is in question anywhere else).
If you want the character whose schtick is enchantment spells but uses other abilties, then you have a lot of options.
A wizard specializing in enchantment (or maybe not specializing at all but just using a lot of enchantments) is a pretty good possibility. The wizard always has spells like heroism, confusion, otto's irresistable dance, dominate person, etc prepared, but keeps a few crude fireballs, magic missiles, summon monsters (maybe even with augment summoning since wizards get a decent number of feats), etc available. Or maybe, you keep scrolls of things like halt undead, command undead, and rust construct available for the encounters when your enchantment abilities won't work.
Another option would be bard. (Maybe with, and maybe without the sublime chord prestige class from (IIRC) Complete Arcane). You don't quite have the enchantment potential of a wizard or sorcerer in terms of spells per day, but you somewhat make up for it by getting a lot of the better enchantment spells earlier--Tasha's Hideous Laugther at 1st level, Confusion at 3rd level, etc. When enchantment spells don't work, you have inspire courage (which is tremendously effective with Inspirational Boost (Complete Adventurer)), inspire Greatness, and a few odd spells that you can pick up like Dispel Magic, glitterdust, etc. And, depending upon how you build your bard (and how generous your stats are), you could also take Arcane Strike and Arcane Preparation (to let you use pearls of power to recover your few spell slots), and mount a credible offense in melee when it comes to that.
I haven't seen a beguiler in action, but, looking at the class in the PHB II, it looks to fit more into the category of a character who makes enchantments and illusions her sole contribution to combat thus doesn't have much to do whenever up against plants, constructs, or undead.